Commit bd8df0a7 by 之约

修改打开方式

parent 4ceded52
......@@ -15,14 +15,14 @@ class DriverTools:
def get_driver(cls):
if cls.__driver is None:
cls.__options = Options()
# cls.__options.add_argument('--headless')
# cls.__options.add_argument('--disable-gpu')
# cls.__options.add_argument('--no-sandbox')
# cls.__options.add_argument('--disable-dev-shm-usage')
# cls.__options.add_argument('--remote-debugging-port=9222')
# cls.__options.add_argument('--window-size=1366x768')
cls.__options.add_argument('--headless')
cls.__options.add_argument('--disable-gpu')
cls.__options.add_argument('--no-sandbox')
cls.__options.add_argument('--disable-dev-shm-usage')
cls.__options.add_argument('--remote-debugging-port=9222')
cls.__options.add_argument('--window-size=1366x768')
cls.__driver = webdriver.Chrome(options=cls.__options)
cls.__driver.maximize_window()
# cls.__driver.maximize_window()
cls.__driver.implicitly_wait(10)
return cls.__driver
......
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