This commit is contained in:
zhaoyafan 2023-05-07 18:19:22 +08:00
parent 34ee4f22a5
commit e65c0acbfc
2 changed files with 4 additions and 1 deletions

View File

@ -568,8 +568,11 @@ class Browser(browser_webdriver):
options = Options()
self.cdplist = cdplist
# Delete prompt information of chrome being controlled.
exclude_switches = ['enable-logging', 'disable-translate']
if browser_choose != 2:
exclude_switches.append('enable-automation')
if classes_driver != 2:
hasattr(options, 'add_experimental_option') and options.add_experimental_option("excludeSwitches", ['enable-automation', 'enable-logging'])
hasattr(options, 'add_experimental_option') and options.add_experimental_option('excludeSwitches', exclude_switches)
# Mobile emulation parameter setting start.
if mobile_emulation:
if hasattr(options, 'add_experimental_option') is False:

Binary file not shown.