我正在尝试从我的办公室环境运行一个基本的selenium脚本,它具有代理和防火墙设置.该脚本运行正常,但在每次执行之前它都会弹出一个提示“管理员禁用解压缩扩展的加载”.这意味着我必须手动点击它才能继续,这违背了自动化的目的.
我用谷歌搜索并堆栈溢出错误,看起来有一个需要禁用的chrome选项useAutomationExtension.我继续搜索python的正确语法(环境:Python 2.7-win32,运行chrome驱动程序2.30.477700(0057494ad8732195794a7b32078424f92a5fce41)),但找不到合适的chrome开关/选项.
我模糊地试过chrome_options.add_argument(‘ – disable-useAutomationExtension’),但这也没有帮助.
所以,我需要你的指导和建议.请帮忙.
Code_part:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException