Selenium Webdriver-TypeError:“模块”对象不可调用

时间:2018-08-26 05:11:59

标签: python selenium-webdriver

在这里,我已经完成了所有建议的搜索。我已经下载了 geckodriver 并将其放入“路径”中。我实际上将它扔到了安装python的文件夹中,然后我使用os.path.dirname(sys.executable)来查看python当前正在从/查看的位置并将其也扔到那里。

from selenium import webdriver

driver = webdriver.Firefox()
driver.get('https://www.sosnc.gov/online_services/search/by_title/_Business_Registration_changes')
search_button = driver.find_element_by_id('search')

1 个答案:

答案 0 :(得分:0)

我的计算机一定有问题。不知道为什么,但是当我在另一台计算机上运行脚本时,它运行良好。谢谢你的帮助。