from selenium import webdriver
class Driver:
def open(self, url):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(10)
self.driver.maximize_window()
self.driver.get(url)
if __name__ == '__main__':
driver = Driver()
driver.open('https://www.baidu.com/')
common层-获取driver的方法
最新推荐文章于 2024-08-28 20:47:20 发布