Home > Enterprise >  'ChromeDriver' object has no attribute 'switch_to'
'ChromeDriver' object has no attribute 'switch_to'

Time:07-05

I was facing an issue where the chromedriver was unable to find element by id eventhough the values were correct. So I added the below step

#switch into iframe
driver.switch_to.frame("frameid")

This is the error message now

'ChromeDriver' object has no attribute 'switch_to'
 chromedriver=81.0.4044.69 chromeversion=81.0.4044.92

Is it because of the older version of chrome being used?

CodePudding user response:

As per the Selenium Python Changelog:

Selenium 2.41

* Support for Firefox 28
* deprecating switch_to_* in favour of driver.switch_to.*

So you were pretty right analyzing the error which was because of older version of chromedriver/chrome combo being used.


Solution

Ensure that:

  • Related