cancel
Showing results for 
Search instead for 
Did you mean: 

Working on multiple windows

SOLVED
Contributor

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.
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

RE: Working on multiple windows


Hi Mor,


 


You can try calling the RefreshMappingInfo method before accessing the objects on the opened window.


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

5 REPLIES 5
Community Manager

RE: Working on multiple windows


Hi Mor,


 


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


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Contributor

RE: Working on multiple 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
Community Manager

RE: Working on multiple windows


Hi Mor,


 


You can try calling the RefreshMappingInfo method before accessing the objects on the opened window.


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

Contributor

RE: Working on multiple windows

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.
Community Manager

RE: Working on multiple windows


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.


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors