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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -