Chrome打开,然后在使用python运行Selenium测试后立即退出。有什么建议么?我到处搜索,但是没有帮助。
from selenium import webdriver
import os
class AutoAlef():
def test (self):
driver_location = 'D:\\chromedriver.exe'
os.environ["webdriver.chrome.driver"] = driver_location
driver = webdriver.Chrome(driver_location)
driver.get("http://www.google.com/")
ChromeTest = AutoAlef()
ChromeTest.test()