when I switch to other window and I want to edit from text box then the xpath of text box giving no such element exception even xpath is correct
please guide me why I am getting a error
when I switch to other window and I want to edit from text box then the xpath of text box giving no such element exception even xpath is correct
please guide me why I am getting a error
Probably, when an application takes you to another window to perform the remaining action so that time selenium control is still vested in the parent window, for that you have to switch to the window first to perform the remaining action. please follow the below line of codes to handle windows.
Set<Integer>Allwindows=driver.getwindowhandles();
for (int windowHandle:Allwindows)
{
sysout("All windows"+windowHandle.size());
}
//Child window
driver.switchTo().windows(1);
//SwitchBack to Parent
driver.switchTO.windows(0);
}