Selenium WindowHandle C# - Switching Back to Main Window -


i writing selenium code using c# , having trouble switching main window after performing tasks in popup window. have code thought work below, cannot find element i'm looking within main window. appreciated. thanks!

//successfully switches popup window string current = driver.currentwindowhandle; popupwindowfinder finder = new popupwindowfinder(driver); string newhandle = finder.click(driver.findelement(by.xpath("/html/body/..xpath"))); driver.switchto().window(newhandle);  //executes functions within popup windows   //cannot either version of code switch main frame /* var switchback =*/ driver.switchto().window(current); 


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -