简体   繁体   中英

Click on button opens new window ,how do I select second opened window in sahi?

When I click on button on base window it opens a new window ,I want to perform action on second window .How do I select the second window in sahi? Tried with _selectWindow(1); but doesnt work..

If you want to move the control to the new window that is opened, then you need to pass the new window's identifier to _selectWindow().

You can also pass url of the page it gets redirected to. Use regex for passing url.

Example: If the new window that gets opened is Google search window then ,

var $WindowIdentifier="/.* google.*/"; _selectWindow($WindowIdentifier);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM