zoukankan      html  css  js  c++  java
  • webdriver之py,driver启动chrome时加载profile

    import os
    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    
    
    executable_path = "path_to_webdriver"
    os.environ["webdriver.chrome.driver"] = executable_path
    
    chrome_options = Options()
    chrome_options.add_extension('path_to_extension')
    
    driver = webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options)
    driver.get("http://baidu.com")
    driver.quit()
    
  • 相关阅读:
    HDU 1423
    POJ 3264
    POJ 3177
    CodeForces 81A
    SPOJ RATING
    ZOJ 2588
    POJ 1523
    POJ 3667
    递归
    数据结构
  • 原文地址:https://www.cnblogs.com/zhangfei/p/3246015.html
Copyright © 2011-2022 走看看