enter image description here这是一个简单的程序,可以在运行的硒中测试chrome驱动程序,但无法获取URL
from selenium import webdriver
import os
class chromeTest:
def testMethod2(self):
driverLocation = "D:\\workspace_python\\chromedriver.exe"
os.environ["webdriver.chrome.driver"] = driverLocation
driver = webdriver.Chrome(driverLocation)
driver.get("http://www.letskodeit.com")
ff = chromeTest
ff.testMethod2(0)