1#!/usr/bin/env python3
2
3from selenium.webdriver import Chrome
4from selenium.webdriver.chrome.options import Options
5
6opts = Options()
7opts.headless = True
8
9driver = Chrome(options=opts, executable_path='chromedriver.exe')
10
11try:
12 driver.get('http://webcode.me')
13
14 assert 'My html page!' == driver.title
15
16finally:
17
18 driver.quit()
19