Using Selenium with remote WebDriver
#coding=utf-8
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
browser = webdriver.Remote(
command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
browser.get("http://www.baidu.com")
browser.get_screenshot_as_file("D:/baidu.png")
browser.close()
# http://selenium-python.readthedocs.io/getting-started.html