TypeError: 'module' object is not callable ( when importing selenium )

前端 未结 2 2063
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 23:52

i have problem when running this code :

>>> from selenium import webdriver
>>> driver = webdriver.firefox()
Traceback (most recent call las         


        
相关标签:
2条回答
  • 2021-01-06 00:40

    You have made a typo.

    webdriver.Firefox()
    

    Note the capital F.

    0 讨论(0)
  • 2021-01-06 00:50

    the same goes for other browsers!

    e.g.

    webdriver.chrome Vs. webdriver.Chrome
    

    (its even harder to notice this!)

    thanks so much for the help! ;)

    0 讨论(0)
提交回复
热议问题