selenium
谷歌与火狐的无头浏览器模式
转载自:https://blog.csdn.net/lwgkzl/article/details/89242832
1 总述: 2 在使用seleinum的时候,如果模拟谷歌或者火狐浏览器,出现一个界面的话太难受了。但是PhantomJS已经挂了(就是不太好用了),所幸firefox和chrome都有了无头模式,也就是没有界面的浏览器,在内存中执行。 3 4 firefox: 5 from selenium import webdriver 6 7 options = webdriver.FirefoxOptions() 8 options.add_argument('-headless') 9 browser = webdriver.Firefox(firefox_options=options) 10 browser.get('http://httpbin.org/get') 11 12 13 chrome: 14 Chrome_options = webdriver.ChromeOptions() 15 Chrome_options.add_argument('-headless') 16 drive = webdriver.Chrome(chrome_options=Chrome_options) 17 drive.get('http://httpbin.org/get') 18
https://www.selenium.dev/documentation/zh-cn/getting_started_with_webdriver/browsers/
http://www.selenium.org.cn/1598.html
移动端的自动化测试工具Appium