首页 > 其他 > 详细

selenium chrome 自动加载flash

时间:2018-07-10 18:55:23      阅读:1226      评论:0      收藏:0      [点我收藏+]
#coding:utf-8
from selenium import webdriver
from selenium.webdriver.support.select import Select
from selenium.webdriver.chrome.options import Options
import time

def login():
chromeOpitons = Options()
prefs = {
# "profile.managed_default_content_settings.images":1,
# "profile.content_settings.plugin_whitelist.adobe-flash-player":1,
"profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player":1,
}
chromeOpitons.add_experimental_option(‘prefs‘,prefs)
driver =webdriver.Chrome(chrome_options=chromeOpitons)
driver.get("http://test.live.liXXXXng.com/#/login")
time.sleep(5)
# Sl = Select(driver.find_element_by_xpath(‘//*[@id="app"]/div[3]/select‘))
# Sl.select_by_value("test")
# time.sleep(5)
login()

selenium chrome 自动加载flash

原文:https://www.cnblogs.com/yanhuidj/p/9290814.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!