locked
how to pass parameters for outer window name .. RRS feed

  • Question

  • Hello All,

    Actually i have 3-4 different projects and the name of outer window gets changed but the all the functions inside are same , but sometime i record the function and run for different project its not able to recognize it . here is the example

    Thanks


    harinder singh

    Wednesday, December 12, 2012 4:03 AM

Answers

  • Hi Harinder,

    Correct me if I am wrong. I assume you want to search for the top level window with slightly different window names as shown above. You can easily achieve this by making few changes in your tests. First thing you can do is to enable smart match option in your playback. This can be achieved by following code: Playback.PlaybackSettings.SmartMatchOptions = SmartMatchOptions.TopLevelWindow;

    This might slow your test a bit while searching for the top level window, but if your windows are as similar to the one shown in the pic, the window will be found.

    Another way to search for the window is to change the search property's operator to contains instead of Equal to. In your test do the following :

    Find the top level window in the UIMap.uitest (its an xml file where the methods and the controls are shown),

    • go to the properties,
    • select the Search Properties,
    • change the Name's operator to contains
    • change the value to the constant part of the window title (Scan Analyzer in the above case)

    Doing the above too will help you search for the top level window in your scenario.

    Thank you

    Bharath


    Bharath G P MSFT

    Wednesday, December 12, 2012 5:38 AM