from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Remote('http://192.168.59.103:4444/wd/hub', webdriver.DesiredCapabilities.CHROME)
driver.get("http://www.python.org")
driver.page_source[:500]
u'<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]--><!--[if IE 7]> <html class="no-js ie7 lt-ie8 lt-ie9"> <![endif]--><!--[if IE 8]> <html class="no-js ie8 lt-ie9"> <![endif]--><!--[if gt IE 8]><!--><html xmlns="http://www.w3.org/1999/xhtml" class="js no-touch geolocation fontface generatedcontent svg formvalidation placeholder boxsizing no-retina flexslide" lang="en" dir="ltr"><!--<![endif]--><head>\n <meta charset='
image = driver.get_screenshot_as_base64()
from IPython.display import HTML
HTML("""<img src="data:image/png;base64,{0}">""".format(image))