【发布时间】:2019-09-25 21:26:03
【问题描述】:
我目前正在使用 Splinter 构建一些 Web 自动化脚本,到目前为止效果还不错,但我遇到了一个问题,我无法使用 Splinter 包装函数来修复它。但是,我相信我可能已经找到了一个可以使用 Selenium Webdriver 函数修复的解决方案,即使我主要使用的是 Splinter。
我相信我在几年前就已经这样做了,但是无论我在哪里搜索(文档、Google、Stackoverflow),我似乎都找不到任何东西,所以也许它不再是一个功能了吗?
无论如何,基本上我需要访问 Selenium Webdriver 功能。
根据记忆,我相信代码类似于:
browser = splinter.browser("firefox")
brower.visit("google.com")
browser.webdriver.find_element_by_id('loginForm') #This is calling the selenium web driver direcetly, not the Splinter find_by_id function.
.webdriver .司机
两者似乎都不起作用。
有谁知道如何正确地做到这一点?如果您需要更多信息,请告诉我。感谢您的帮助。
【问题讨论】:
标签: splinter