In [1]:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
In [2]:
driver = webdriver.Remote('http://192.168.59.103:4444/wd/hub', webdriver.DesiredCapabilities.CHROME)
In [3]:
driver.get("http://www.python.org")
In [4]:
driver.page_source[:500]
Out[4]:
In [5]:
image = driver.get_screenshot_as_base64()
In [7]:
from IPython.display import HTML
HTML("""<img src="data:image/png;base64,{0}">""".format(image))
Out[7]:
In [ ]: