python+selenium自动化测试,配置浏览器的作用
from selenium import webdriver
option = webdriver.ChromeOption()
option.add_argument('r'--user-agent=C:\Users\cm001\AppData\Local\Google\Chrome\User Data'')#模仿本机
option.add_argument('--user-agent=iphone')#模仿苹果手机
option.add_argument('--user-agent=android')#模仿安卓手机
driver = webdriver.Chrome(options = option)

其余的作用尚未发现,有待加强
浙公网安备 33010602011771号