'switchto.defaultcontent() method not working with chromedriver 99.0.434

Problem: On a web page> + icon>clicking on it>opens a small widget on same page. it has iframe to access the fields, so switch to iframe. after this need to click on a button which does not come under any iframe. So I was trying to come out of iframe by switchto().defaultcontent() but this is not working. And as a result that button is not found.



Solution 1:[1]

I can confirm that with Selenium.WebDriver.ChromeDriver v99 switchTo().DefaultContent() is not working, once you selected a new frame switchTo.Frame(1)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FLorin P