How to navigate back to main page from an iframe
?
Example:
driver.SwitchTo.Frame(1);
driver.SwitchTo().DefaultContent();
Is not working. Can anyone suggest any other way to retain control?
This is the way recommended at seleniumeasy Working with frames
driver.switchTo().defaultContent();
You could always directly switch back to the window using:
driver.SwitchTo().Window(driver.WindowHandles[0]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With