小编Han*_*lin的帖子

WebDriver' object has no attribute 'switch_to_frame'

I cannot switch to the sucessfully identified iFrame(s). The script identifies the iFrame (checked in debugger), but the switch to the iFrame fails and runs into the exception trap. Few times ago it worked perfectly.

Message='WebDriver' object has no attribute 'switch_to_frame'
Run Code Online (Sandbox Code Playgroud)

What happened in the meantime?

Chromedriver has been updated from version 95.0.4638.17 to ChromeDriver 96.0.4664.45

Is the Chromedriver is no longer compatible with the latest Selenium version?

... 
driver.switch_to.default_content()

try:
    # find the frame
    wait.until(EC.element_to_be_clickable((By.ID, "wysiwygTextarea_ifr")))
    frame2 = driver.find_element(By.XPATH, …
Run Code Online (Sandbox Code Playgroud)

python iframe selenium frame selenium-webdriver

6
推荐指数
1
解决办法
9632
查看次数

标签 统计

frame ×1

iframe ×1

python ×1

selenium ×1

selenium-webdriver ×1