最初的watir-webdriver启动后,边缘浏览器崩溃 [英] Edge browser crashing after initial watir-webdriver launch

查看:133
本文介绍了最初的watir-webdriver启动后,边缘浏览器崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用最新的selenium-webdriver(2.47.1)和watir-webdriver(0.8.0),并将Edge WebDriver像其他webdriver.exe文件一样安装在Ruby/bin文件夹中;像chromedriver或iedriver.它似乎启动了Edge浏览器,但是在关闭浏览器并没有通过所有测试之前,没有尝试进入URL.我在Windows中的防火墙允许它运行我的rspec测试时指出:

I'm using the latest selenium-webdriver (2.47.1) and watir-webdriver (0.8.0) and have the Edge WebDriver installed in the Ruby/bin folder like other webdriver.exe files; like chromedriver or iedriver. It appears to launch the Edge browser but does not attempt to goto the URL before closing the browser out and failing all of my tests. I have it allowed by the Firewall within Windows, when i run my rspec tests it states:

Selenium::WebDriver::Error::NoSuchWindowError: no such window

有人让MSWebdriver与watir-webdriver一起工作吗?

Has anybody gotten MSWebdriver to work with watir-webdriver?

错误:

c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/response.rb:71:in `assert_ok': not implemented (Selenium::WebDriver::Error::WebDriverError)
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:78:in `new'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:78:in `create_response'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/default.rb:90:in `request'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:657:in `raw_execute'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:635:in `execute'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:221:in `switchToDefaultContent'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/common/target_locator.rb:96:in `default_content'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.8.0/lib/watir-webdriver/browser.rb:385:in `assert_exists'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.8.0/lib/watir-webdriver/browser.rb:110:in `url'
        from c:/Ruby-222-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.8.0/lib/watir-webdriver/browser.rb:79:in `goto'
        from msedge.rb:4:in `<main>'

此外,IE可以正常工作.

Additionally, IE works as expected.

推荐答案

这个问题看起来已经很老了,但是如果有人仍在寻找答案,让我尝试回答....

Look like this question has become very old but let me try answering if someone is still looking for answers....

为MSEdge使用MSWebdriver时要考虑的以下几点

Following points to consider when using MSWebdriver for MSEdge

1)仅下载适用于您的操作系统构建版本的驱动程序,其他MSWebDriver无法使用 如何检查您的Windows 10 OS版本? 打开运行(Win + R)并键入winver

1) Download the driver for your OS build only, other MSWebDriver wont work How to check your Windows 10 OS build?? Open Run(Win+R) and type winver

2)下载正确的版本后,将其放置在PATH变量中存在的任何文件夹中,或将其放置在某个位置,然后将该位置添加到PATH变量中

2) After you download correct version then place it in any folder which is present in PATH variable or place it somewhere and add that location to PATH variable

3)现在,通过适当地初始化边缘浏览器来正常运行测试 例如:ruby-webdriver:driver = Selenium :: WebDriver.for:edge

3) Now run your tests normally with initializing edge browser appropriately eg: ruby-webdriver : driver = Selenium::WebDriver.for :edge

希望这会有所帮助!! 祝您自动化!!

Hope this helps!! Happy Automation!!

这篇关于最初的watir-webdriver启动后,边缘浏览器崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆