JBOSSUSER
JBOSSUSER

Reputation: 35

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

Upvotes: 0

Views: 56

Answers (1)

Ajinkya Ghodake
Ajinkya Ghodake

Reputation: 1

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);

Upvotes: 0

Related Questions