When I try to switch to frame on the webpage using Webdriver in Selenium in Python, it shows me the error. Please find my code below:
driver.switchTo().frame("frame");
AttributeError: 'WebDriver' object has no attribute 'switchTo'
That's because you're using the Java method. In Python you should use
driver.switch_to.frame("frame_name")
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