【发布时间】:2016-10-27 15:59:48
【问题描述】:
我已经在 mac 上使用“pip install selenium”安装了 selenium。 还创建了一个文件 functional_tests.py 。它的内容是
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://localhost:8000')
assert 'Django' in browser.title
当我使用 python3 functional_tests.py 运行此脚本时,我得到:no module named selenium。
【问题讨论】:
-
试试
pip3 install selenium。您的 pip 版本可能适用于 python 2.7 -
谢谢..它成功了!
标签: python django python-3.x