python安装目录下.\Lib\site-packages\selenium\webdriver\chromium\options.py
文件中的第34行
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import base64
impo

通过修改selenium的ChromiumOptions源码,将'excludeSwitches'设置为['enable-automation'],或者参考链接中提供的不修改源码的方法,解决在Chrome V76及以上版本中‘chrome正受到自动测试软件的控制’的问题。原先的解决方案如添加'disable-infobars'参数在新版本已失效。
最低0.47元/天 解锁文章
2万+

被折叠的 条评论
为什么被折叠?



