Edge WebDriver的问题 [英] Issues with edge webdriver

查看:124
本文介绍了Edge WebDriver的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Microsoft Edge浏览器上执行自动测试用例.在执行测试用例时,Edge被启动,页面被加载,但是随后它无法执行javaScript(使用IJavaScriptExecutor)并抛出以下异常:

I am trying to execute automated test-cases on Microsoft Edge browser. While executing a test-case, Edge get launched, page get loaded but then it fails to execute javaScript (using IJavaScriptExecutor) and throw below exception:

-> error: unknown error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 31 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'DESKTOP-VJGM30D', ip: '172.20.13.56', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.edge.EdgeDriver
Capabilities [{acceptSslCerts=true, browserVersion=20.10240.16384.0, platformVersion=10, browserName=MicrosoftEdge, takesScreenshot=true, pageLoadStrategy=normal, takesElementScreenshot=true, platformName=windows, platform=ANY}]

但是,我发现了一种执行JavaScript的解决方法.每当您在边缘浏览器中通过自动化脚本打开URL时,只需打开其开发人员工具(按F12键)即可.然后它将开始在边缘浏览器上执行JavaScript.有没有人遇到过类似的问题,如果可以,您是怎么解决的?

However I discovered a workaround to execute JavaScript. Whenever you open a url in edge browser (through your automation-script), just open its developer tools (by pressing F12 key). It will then start executing JavaScript on edge browser. Have anyone faced similar issue and if yes what did you do to resolve that?

边缘浏览器遇到的第二个问题是我无法在边缘浏览器上并行运行测试用例.我打开了两个Visual Studio实例,并从每个实例运行一个测试用例.我意识到edge-webdriver的两个实例都指向相同的edge-browser-instance.如果有人遇到此问题,请告诉我.如果是,那么如何在同一台机器上并行运行测试用例?

Second issue that I faced with edge browser is that I am not able to run test-cases in parallel on edge browser. I opened two instances of visual studio and run one test-case from each instance. I realized that both the instances of edge-webdriver were pointing to same edge-browser-instance. Please let me know if any of you faced this issue. If yes, then how could you run test-cases in parallel on same machine?

我遇到的第三个问题是,我们无法从使用Admin特权运行的进程中运行测试用例.非常奇怪的是,在没有管理员特权的情况下,测试用例可以正常运行.在这方面有什么投入吗?

Third issue that I faced is that we can't run test-cases from a process that is running with Admin privileges. Its very strange that test-cases run fine when running without Admin privileges. Any input in that regard?

请帮助.还可以请您推荐Edge-webdriver的最稳定版本吗?

Please help. Also could you please suggest most stable version of edge-webdriver?

亲切问候 阿西姆(Aseem)

Kind Regards Aseem

推荐答案

我相信您的浏览器版本与MS Web驱动程序不匹配.我有一个类似的问题.我的浏览器版本是25.10586.从 Microsoft WebDriver 2015年秋季更新解决了我的问题.

I believe your browser version doesn't match with MS web driver. I had a similar issue. My browser version was 25.10586. Downloading Edge Windows/Microsoft Edge build 10586 from Microsoft WebDriver Fall 2015 Update fixed my issue.

还请检查另一个stackoverflow线程.如果您使用的是Windows 10,建议您还应该检查功能.

Please also check Another stackoverflow Thread. It is suggesting that you should also check Capablities if you are on Windows 10.

这篇关于Edge WebDriver的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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