chrome 驅動下載地址
https://sites.google.com/a/chromium.org/chromedriver/home
放入代碼目錄下
運行django
from selenium import webdriver
browser = webdriver.Chrome()
browser.get('http://localhost:8000')
assert 'A' in browser.title
會打開chrome 然後會報錯
Traceback (most recent call last):
File "C:/Users/DL/Documents/superlists/test/functional_tests.py", line 5, in <module>
assert 'A' in browser.title
AssertionError
如果 A 改爲 Django 則不報錯