Tutorial: Create UFT Support for a Custom WPF Control > Deploy and Test Your Basic Custom Server and Identification Property Support

Deploy and Test Your Basic Custom Server and Identification Property Support

In this section, you deploy the custom server that you developed to support the Calendar control and test its effect on UFT.

  1. Build your solution and then deploy the custom server by copying the CalendarSrv.dll file to the <UFT installation folder>\dat\Extensibility\WPF\MyWpfToolkit folder. You do not need to deploy the XML files because you did not change them.

  2. Run the sample control by opening the <WPF and Silverlight Add-in Extensibility SDK installation folder>\samples\WPFExtCalendarSample\Application\WpfCalendar.exe file.

    Note: You can use an open instance of UFT because you did not modify configuration files. However, if the Calendar application is open, you must close it and run it again.

  3. Use the Object Spy to see how UFT recognizes the Calendar control and its children, and to view its identification properties:

    • The calendar is represented by a MyWpfCalendar test object class.

    • The day numbers within the calendar are considered part of the Calendar control and are not represented by separate WpfButton test objects.

    • The value of the is_today_highlighted property is displayed.

    • The Selected Date box remains external to the Calendar control, and is still represented by a separate WpfEdit test object, as planned.

  4. Use the Add Objects to Local button in the Object Repository dialog box to learn the Calendar control. A MyWpfCalendar test object named calendar1 is added to the object repository.

  5. Start a recording session and create a checkpoint that checks the value of the is_today_highlighted property of the calendar1 test object. Stop the recording session and run the step to verify that the property value is properly retrieved.

  6. In the Keyword View, create a test step with the calendar1 test object. The default SetDate operation is selected automatically. Enter a date in the Argument column (in the format: mm/dd/yyyy).

  7. Run the test. Because you have not yet implemented support for running test object methods, a run-time error occurs. In the next section, you implement this support.

Continue to Implement Support for Running Test Object Operations.