Python实现H5页面

1 from selenium import webdriver
2 mobile_emulation = {
     'deviceName':'iPhone X'}
3 options = webdriver.ChromeOptions()
4 options.add_experimental_option('mobileEmulation',mobile_emulation)
5 drivers = webdriver.Chrome(chrome_options=options)
6 drivers.maximize_window()
7 drivers.get("http://www.baidu.com")

 

转载于:https://www.cnblogs.com/nieliangcai/p/9277244.html

你可能感兴趣的:(python,开发工具,前端)