Forum Discussion

morde's avatar
morde
Contributor
11 years ago
Solved

Working on multiple windows

Hi,



I am working on some different IE windows (and navigating by "alt+tab" keys). most of the times the objects are recognised, but sometimes (especially when it's a popup) - they don't. 

How can I "tell" TC that I want it to look for an object in window1 and not window2?



Thanks,

Mor.

5 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Mor,


     


    Are you using Name Mapping to identify objects? In this case, your mapping criteria should handle the situation with different windows.


     

  • Hi Tanya,



    I use NameMapping as described. each object is uniquly identified by its type and another property (objectIdentifier / Caption or whatever fits). I notice that on every window, the first action I do on an object is not recognized but the other are recognized.



    For example: 

    I have one window open and now I open one more.

    on the new window I need to check 3 checkboxes.

    when I do so, the 2 last checkboxes are checkes, but the first one is not recognized. 

    (tried to switch places - it's always the first one who make the problems)



    Thanks,

    Mor
  • Hi Tanya,



    indeed, this solved my problem :)

    but... it taks a lot of time (nearly 10 seconds each time). Is there a way to make this process faster?

    (I used this method on a specific object instead of the whole name mapping but it still too slow)



    Thank you,

    Mor.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Mor,


     


    You can try using the WaitAliasChild method with the specified timeout to obtain the mapped object. Please read the "WaitAliasChild Method" article for details. Perhaps, it will help you speed up the test execution.