我正在尝试使用Splinter点击框架中的链接。当我尝试id,name,text,xpath时,它表示元素不存在。我试图获得所有元素,但它也说无法找到。
ctypes.c_int
错误:
import splinter
executable_path = {'executable_path':'C:\\code\\chromedriver-2.29\\chromedriver'}
web1 = splinter.Browser('chrome', **executable_path)
url = ""
ipAddr = '192.168.168.168'
web1.visit('https://' + ipAddr + '/' + url)
with web1.get_iframe('outlookFrame') as iframe2:
IDs = iframe2.find_elements_by_xpath('//*[@id]')
for items in IDs:
print items
我尝试运行execute_script(),它也没有用。我用不同的方法花了很多时间,但我无法弄明白。
AttributeError: 'WebDriver' object has no attribute 'find_elements_by_xpath'
错误:
with web1.get_iframe('outlookFrame') as iframe2:
javaScript = 'toggleTree("pnl10","usersStatusView.html");'
web1.execute_script(javaScript)
raise exception_class(message, screen, stacktrace)
这是我正在使用的菜单。我试图分裂打开usersSettingsView.html。我无法直接从url打开它,因为它打破了配置过程,我必须使用菜单。我正在寻找关于最佳方法的建议,因为显然我的不好。
selenium.common.exceptions.WebDriverException: Message: unknown error: Cannot read property 'location' of undefined
欢迎所有的想法!感谢。