chrome 自動加載flash


class Login(unittest.TestCase):
#初始
def setUp(self):
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)
time.sleep(1)
self.driver = webdriver.Chrome(chrome_options=chromeOpitons)
time.sleep(2)
self.driver.get("http://www.youku.com")
time.sleep(2)
self.driver.maximize_window()
time.sleep(2)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM