Python Selenium(等待框架)

时间:2012-03-22 17:13:01

标签: python selenium

  

可能重复:
  Python Selenium (waiting for frame, element lookups)

我有这些包括:

from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys

通过

设置浏览器
browser = webdriver.Firefox() 
browser.get(loginURL)

但有时我会

browser.switch_to_frame("nameofframe")

它不会起作用(有时它会起作用,有时却不起作用)。有什么办法迫使它等到它检测到帧?

0 个答案:

没有答案
相关问题