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()
点亮测试人生!QQ:408129370
百度阅读电子书地址:http://yuedu.baidu.com/ebook/f6dbb2a2f01dc281e53af0f3
讨论QQ群:536192476
个人公众号:
百度阅读电子书地址:http://yuedu.baidu.com/ebook/f6dbb2a2f01dc281e53af0f3
讨论QQ群:536192476
个人公众号: