我使用的是最新的selenium-webdriver (2.47.1)和watir-webdriver (0.8.0),并且像其他webdriver.exe文件一样将Edge WebDriver安装在Ruby/bin文件夹中;比如chromedriver或iedriver。它似乎会启动Edge浏览器,但在关闭浏览器并使我的所有测试失败之前,它不会尝试转到URL。我在Windows内的防火墙允许它,当我运行我的rspec测试时,它显示:
Selenium::WebDriver::Error::NoSuchWindowError: no such window
有没有人让MSWebdriver和w
我正在使用Cucumber与Capybara和Selenium-Webdriver一起测试Chrome扩展。
我的测试非常简单:
@chrome_extension
@javascript
Scenario: Test1
Given I open a browser
And I close the browser
When I do nothing
Then nothing happens
其中,步骤定义为:
require 'selenium-webdriver'
Given /^I open a br
我正在运行一个角度应用程序的E2E测试。为了使用protractor.conf.js,我确实编辑了SeleniumStandalone。它看起来很好,我可以使用:ng e2e运行测试。
protractor.conf.js
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
// location of the Selenium JAR file and chromedriver, use these if you installed protractor loca
我正在尝试让我的代码(使用Watir为IE8开发的)与watir-webdriver和IE9一起工作。目前我有一个等待的问题。
例如
Watir::Wait.until{browser.button(:value, "Login").exists?}
它不会等待并给出下一个错误
C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.12.2/lib/selenium/webdriver/remote/response.rb:50:in `assert_ok': Unable to find element wi
最近,尤其是在同一台pc上运行多个任务和进程的情况下,selenium webdriver 2给出了许多无法访问的浏览器异常,这些异常总是带有java套接字异常:
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser
我使用rspec 3.9、Capybara3.3和selenium-webdriver 3.142与chrome进行测试。
我想确保浏览器在关闭/重新打开浏览器后保留“记住我”cookies。
但我无法关闭当前浏览器。
current_window
=> #<Window @handle="CDwindow-EE538F0EA985E268B76B91E21375BBD2">
current_window.close
ArgumentError: Not allowed to close the primary window
from /Users/otak
我的红宝石脚本在Firefox上运行良好,但在Internet上给出了如下内容
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/response.rb:51:in `assert_ok': Unable to find element on closed window (Selenium::WebDriver::Error::NoSuchWindowError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/
今天,当我使用selenium webdrive时,我得到了一个错误。我的平台是mac osx。这是我的异常日志。
ruby-1.9.2-p0 > Selenium::WebDriver.for :firefox
Selenium::WebDriver::Error::WebDriverError: unable to bind to locking port 7054 within 45 seconds
from /Users/Apple/.rvm/gems/ruby-1.9.2-p0/gems/selenium-webdriver-0.1.0/lib/selenium/webdri
我用带边的硒。
from selenium import webdriver
driver = webdriver.Edge()
driver.get("xxxxx")
当我打开边缘窗口时,当我运行这段代码时,它将显示selenium.common.exceptions.NoSuchWindowException: Message: The specified window could not be found.。
换句话说,如果我在没有边缘窗口的情况下运行这段代码,它将毫无例外地运行良好。
如果打开了edge窗口,如何使用edge运行selenium?
关于边缘版本:
Mi
我目前正在设置一些Cucumber测试,我的Hook文件包含以下内容:
require 'watir'
Before do
@browser = Watir::Browser.new :chrome
end
After do
@browser.close
end
当我运行我的功能文件时,我得到了以下内容:
cannot load such file -- watir (LoadError)
/Users/marklane/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:i
当我通过Selenium网格运行ant目标时,我能够并行启动所有目标。如果我在完成执行之前关闭任何Firefox会话。我得到了:
ERROR Server Exception: sessionId fc89c194951a4790bce8418dac7d5ceb doesn't exist;
perhaps this session was already stopped?
[java] at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(H
我对运行在线程中的Watir有一个问题。基本上看起来是这样的:我正在创建线程(假设有三个线程)。然后我正在创建新的浏览器,访问网页并试图关闭此浏览器。所有事情都正常工作了2-3个小时,然后我得到了这个错误(browser.close导致了这个错误):
Errno::ECONNREFUSED: Connection refused - Connection refused
initialize at org/jruby/ext/socket/RubyTCPSocket.java:124
open at org/jruby/RubyIO.java:1123
[7] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> page.execute_script "window.close()"
Selenium::WebDriver::Error::NoSuchWindowError: Script execution failed. Script: window.close();
The window could not be found
[8] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> page.driver
我正在使用watir-webdriver来驱动IE使用另一个网站的SSL证书来测试另一个网站。(同一网站的生产版本)
当我访问我的站点时,我得到一个如下所示的页面(因为安全证书是错误的)
watir文档提供了此覆盖链接(:id,“”).click的解决方法
当我试图在ruby控制台中运行它时,我得到了一个错误。
irb(main):050:0> b.link(:id, "overridelink").click
Selenium::WebDriver::Error::UnexpectedJavascriptError: Unable to find element wi
当我尝试使用"rake jasmine:ci“命令通过Selenium运行示例javascript规范时,我在Ubuntu上使用Jasmine时遇到了一个问题。当net/http试图连接到正在运行Selenium的端口时,我会周期性地收到“连接被拒绝”的错误。我得到的回溯开始的一个例子是:
Waiting for jasmine server on 44210...
jasmine server started.
Running: java -jar "/home/pete/.rvm/gems/ree-head/gems/selenium-rc-2.2.4/vendor/sel
我正在尝试使用相同的WebDriver实例连续运行几个测试。在我执行的每一个测试之后:第一个测试通过了driver.close();,但第二个在尝试调用driver.get(URL)时收到了一个错误:
org.openqa.selenium.remote.SessionNotFoundException: no such session
(Driver info: chromedriver=2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961),platform=Windows NT 6.1 SP1 x86_64) (WARNING: