小编kav*_*kav的帖子

Selenium Python selenium.common.exceptions.WebDriverException:消息:使用 geckodriver 和 firefox 拒绝连接

我在运行自动化测试脚本时遇到问题。当我运行我的脚本时,会出现一个浏览器,但它不会输入 URL 并等待 10 秒,直到它抛出异常。是否有任何我可以使用的解决方案,以便我可以让我的自动化测试脚本工作?

Geckodriver.log :

1523997052492   geckodriver INFO    geckodriver 0.20.1
1523997052531   geckodriver INFO    Listening on 127.0.0.1:37807
1523997052592   mozrunner::runner   INFO    Running command: "/usr/bin/firefox/firefox" "-marionette" "--headless" "-profile" "/tmp/rust_mozprofile.PU1cngaAJ5Tg"
1523997054831   Marionette  INFO    Listening on port 2828
Run Code Online (Sandbox Code Playgroud)

堆栈跟踪:

Error
Traceback (most recent call last):
File 
"/home/kavin/PycharmProjects/untitled/Testing/purchaseAmazonItems.py", line 13, in setUp
self.driver = webdriver.Firefox(firefox_binary=binary, firefox_options=opts)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", …
Run Code Online (Sandbox Code Playgroud)

python firefox selenium selenium-webdriver geckodriver

5
推荐指数
1
解决办法
5796
查看次数

如何在电话号码格式的范围内生成随机数邮递员

我想在特定的数字范围内生成随机数。我尝试了此 stackoverflow链接中提供的解决方案,但没有一个解决方案不起作用。我只能生成 1 个随机数而不是特定范围的数字。我可以使用其他解决方案为特定范围生成随机数吗?

我正在寻找具有随机数的 10 个数字的范围。我正在寻找电话号码格式。例如:(651) 651-6516

javascript random automated-tests postman

4
推荐指数
1
解决办法
3925
查看次数