Python 驱动程序在功能/状态下不工作
我用页面对象模型在python上编写了一个自动化测试示例 我创建了一个基类和一些函数来调用其他模块 当我做func时,驱动程序没有打开。但是没有任何错误消息。 当删除func时,驱动程序工作 主要问题是什么Python 驱动程序在功能/状态下不工作,python,selenium,selenium-chromedriver,Python,Selenium,Selenium Chromedriver,我用页面对象模型在python上编写了一个自动化测试示例 我创建了一个基类和一些函数来调用其他模块 当我做func时,驱动程序没有打开。但是没有任何错误消息。 当删除func时,驱动程序工作 主要问题是什么 class Base(): baseUrl = "https://www.example.com/" exec_path = "C:/Users/bzkles/PycharmProjects/example/driver/chromedriver.ex
class Base():
baseUrl = "https://www.example.com/"
exec_path = "C:/Users/bzkles/PycharmProjects/example/driver/chromedriver.exe"
def setUp(self):
self.driver = webdriver.Chrome(executable_path= self.exec_path)
self.driver.get(self.baseUrl)
self.driver.maximize_window()
def tearDown(self):
self.driver.quit()
您在哪里调用
设置程序
?请加上那一行。类似于Base.setUp()?