不能运行 pytest + selenium
Can't run pytest + selenium
请帮帮我!
当我尝试 运行 使用 pytest+selenium 进行简单测试时,它没有启动。什么也没发生:
import pytest
def test_example(selenium):
selenium.get('http://www.example.com')
截图https://gyazo.com/01d93c221cc6acff0446f1fb473000cb
注意:我在我的工作 PC 上做同样的事情 - 它有效!
我是白痴(((
安装 pytest-selenium
使用 pip 安装 pytest-selenium:
$ pip 安装 pytest-selenium
我觉得够了:
pip 安装 pytest
pip 安装硒
我想指出,您可以使用 pytest-selenium,但也可以仅使用 pytest 和 selenium(例如 requirements.txt 中的 selenium==3.0.2)文件。您遇到的问题看起来像是依赖性问题。
我还想指出,您上传的屏幕截图包含与您的暂存环境相关的敏感信息。您应该编辑它或完全删除文件。
请帮帮我! 当我尝试 运行 使用 pytest+selenium 进行简单测试时,它没有启动。什么也没发生:
import pytest
def test_example(selenium):
selenium.get('http://www.example.com')
截图https://gyazo.com/01d93c221cc6acff0446f1fb473000cb
注意:我在我的工作 PC 上做同样的事情 - 它有效!
我是白痴((( 安装 pytest-selenium 使用 pip 安装 pytest-selenium:
$ pip 安装 pytest-selenium
我觉得够了: pip 安装 pytest pip 安装硒
我想指出,您可以使用 pytest-selenium,但也可以仅使用 pytest 和 selenium(例如 requirements.txt 中的 selenium==3.0.2)文件。您遇到的问题看起来像是依赖性问题。
我还想指出,您上传的屏幕截图包含与您的暂存环境相关的敏感信息。您应该编辑它或完全删除文件。