selenium+python 用手机模式打开浏览器
from selenium import webdrivermobile_emulation = {'deviceName': 'iPhone 6'}
options = webdriver.ChromeOptions()
options.add_experimental_option("mobileEmulation", mobile_emulation)
browser = webdriver.Chrome(executable_path='chromedriver.exe', chrome_options=options)
browser.get("http://www.baidu.com")
browser.implicitly_wait(2)
今天用了下,真的很棒:victory::victory:
页:
[1]