小编ale*_*lex的帖子

Selenium/Python:TypeError:undound方法get()

我是Selenium的Python新手.我试着测试我的第一个python/selenium代码并得到一个错误.

from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
import time

# Create a new instance of the Firefox driver
driver = webdriver.Firefox

# go to the google home page
driver.get("http://www.google.com")
Run Code Online (Sandbox Code Playgroud)

在这里,我有错误:

**TypeError:unbound method get() must be called with Webdriver instance as first argument (got str instance instead)**
Run Code Online (Sandbox Code Playgroud)

有人知道如何解决这个问题吗?提前致谢!

selenium python-2.7 selenium-webdriver

9
推荐指数
1
解决办法
3201
查看次数

标签 统计

python-2.7 ×1

selenium ×1

selenium-webdriver ×1