from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:9222") chrome_driver = r"D:\code\python\selenium_ui_auto\driver\chromedriver.exe" driver = webdriver.Chrome(chrome_driver, chrome_options=chrome_options) driver.find_element_by_id(‘kw‘).send_keys(u‘测试工程师小站‘)
---------------------------------------------------------------------------------
关注微信公众号(测试工程师小站)即可在手机上查阅,并可接收更多测试分享,发送【测试资料】更可获取百G测试教程~
原文:https://www.cnblogs.com/songzhenhua/p/12864048.html