Commit abee1e04 by 宋鹏博

1

parent 047687e8
......@@ -9,7 +9,6 @@ from config import appium_server_url, caps
class DriverTools:
__driver = None
__app_driver = None
__chrome_options=None
# 初始化web驱动
@classmethod
def get_driver(cls):
......@@ -17,11 +16,6 @@ class DriverTools:
cls.__driver = webdriver.Chrome()
cls.__driver.maximize_window()
cls.__driver.implicitly_wait(10)
cls.__chrome_options=webdriver.ChromeOptions()
cls.__chrome_options.add_argument("--headless") # 后台运行
cls.__chrome_options.add_argument("--no-sandbox") # 绕过操作系统安全模型
cls.__chrome_options.add_argument("--disable-gpu") # 如果适用的话禁用GPU加速
cls.__chrome_options.add_argument("--window-size=1920,1080")
return cls.__driver
# 关闭web驱动
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment