How to pass session value in webdriver switchTo().window method -


i need pass session value 1 window other window. sing switchto() method in webdriver, if need new window's findelement(by.linktext). click() event, session value not sending link becoming invalid.

please provide example handles passing session values.

thanks in advance.

venkat

this script helps switch on parent window child window , cntrl parent window

string parentwindow = driver.getwindowhandle(); set<string> handles =  driver.getwindowhandles(); for(string windowhandle  : handles) {    if(!windowhandle.equals(parentwindow))    {         driver.switchto().window(windowhandle);         //perform operation here new window         driver.close(); //closing child window         driver.switchto().window(parentwindow); //cntrl parent window     } } 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -