无法使用Selenium和IEWebDriverServer 3.4.0在Windows Server 20
>操作系统:
Windows Server 2016 Datacenter(64位)
>浏览器:Internet Explorer 11.0.14393.0 >量角器:5.1.2 > Selenium服务器独立版:3.4.0 > IEWebDriverServer.exe:3.4.0 > Java:1.8.0_131 我们正尝试在Windows Server 2016 VM上针对Internet Explorer 11运行自动化测试.可以通过Selenium服务器对VM上的Chrome执行测试,但在IE中失败. 当针对IE运行时,量角器能够启动在IE中打开的Selenium服务器.然后在地址栏中使用’about:blank’启动另一个窗口.这会快速关闭,并在控制台窗口中显示以下错误: [13:57:18] I/launcher - Running 1 instances of WebDriver [13:57:18] I/local - Starting selenium standalone server... [13:57:19] I/local - Selenium standalone server started at http://10.X.X.X:61263/wd/hub Started A Jasmine spec timed out. Resetting the WebDriver Control Flow. Failures: 1) angularjs homepage todo list should add a todo Message: Failed: JavaScript error (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 26 milliseconds Build info: version: '3.4.0',revision: 'unknown',time: 'unknown' System info: host: 'XXXX',ip: '10.X.X.X',os.name: 'Windows Server 2016',os.arch: 'x86',os.version: '10.0',java.version: '1.8.0_131' Driver info: org.openqa.selenium.ie.InternetExplorerDriver 从Web驱动程序进一步记录已发现一些[访问被拒绝.]问题: D 2017-06-22 10:43:26:213 BrowserFactory.cpp(248) Starting IE using the IELaunchURL API D 2017-06-22 10:43:26:360 BrowserFactory.cpp(202) IE launched successfully with process ID 4612 D 2017-06-22 10:43:26:360 BrowserFactory.cpp(208) Process with ID 4612 is executing iexplore.exe D 2017-06-22 10:43:26:360 BrowserFactory.cpp(375) Using Active Accessibility to find IWebBrowser2 interface D 2017-06-22 10:43:27:615 BrowserFactory.cpp(434) Found window handle 000A017A for window with class 'Internet Explorer_Server' belonging to process with id 4612 D 2017-06-22 10:43:27:636 BrowserFactory.cpp(396) Ignoring zoom setting: 0 W 2017-06-22 10:43:27:644 BrowserFactory.cpp(664) -2147024891 [Access is denied.]: Call to IHTMLWindow2::get_screen failed … I 2017-06-22 10:43:28:028 Browser.cpp(130) No child frame focus. Focus is on top-level frame W 2017-06-22 10:43:28:040 Script.cpp(494) -2147024891 [Access is denied.]: Unable to execute code,call to IHTMLWindow2::execScript failed W 2017-06-22 10:43:28:040 Script.cpp(180) Cannot create anonymous function W 2017-06-22 10:43:28:040 response.cc(77) Error response has status code 17 and message 'JavaScript error' message … 很明显IE中存在权限问题,但浏览器安全设置的任何松动都没有产生任何影响. 我尝试过的: >为所有区域设置“启用保护模式” 有没有人在Windows Server 2016上运行IEDriverServer有什么成功?如何通过这些访问被拒绝的问题? 量角器配置: exports.config = { capabilities: { 'browserName': 'internet explorer','platform': 'WINDOWS','version': '11' },seleniumServerJar: '<absolute path to /npm/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar>',localSeleniumStandaloneOpts : { jvmArgs : ["-Dwebdriver.ie.driver.loglevel=DEBUG","-Dwebdriver.ie.driver.logfile=C:/IEServerlog.log","-Dwebdriver.ie.driver=<absolute path to /npm/node_modules/protractor/node_modules/webdriver-manager/selenium/IEDriverServer3.4.0.exe>"] },specs: ['spec.js'] }; Spec.js: describe('angularjs homepage todo list',function() { it('should add a todo',function() { browser.get('https://angularjs.org'); element(by.model('todoList.todoText')).sendKeys('write first protractor test'); element(by.css('[value="add"]')).click(); var todoList = element.all(by.repeater('todo in todoList.todos')); expect(todoList.count()).toEqual(3); expect(todoList.get(2).getText()).toEqual('write first protractor test'); // You wrote your first test,cross it off the list todoList.get(2).element(by.css('input')).click(); var completedAmount = element.all(by.css('.done-true')); expect(completedAmount.count()).toEqual(2); }); }); 解决方法
我在其他版本的webdriver-manager中遇到过这个问题.使用3.4.0解决了问题
webdriver-manager update --versions.standalone=3.4.0 --ie32 将webdriver-manager更新到3.4.0并启动特定的3.4.0 webdriver-manager start --versions.standalone=3.4.0 您应该能够在IE浏览器中运行. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows-server-2008-r2 – 如何在Windows Server 2008 R2上
- Win32 CMD批处理命令
- windows-7 – 如何从命令行或系统调用打开“性能选项”对话
- windows-phone-8.1 – Windows 10中的Windows Phone 8.1模拟
- windows-server-2003 – 戴尔PowerEdge IO和性能相关的问题
- yolo-windows
- 在Windows上设置Git Bash中提示的颜色
- MDT 2013 从入门到精通之概念扫盲
- windows-server-2008-r2 – 远程桌面会话远程控制始终返回错
- Windows – NSIS – 如何将所有文件夹从源代码安装到安装程
- 如何使用MinGW / MSYS在Windows上安装wxHaskell
- windows-server-2003 – 为WebSites定义IIS IP地
- Windows – Win32:如何验证Active Directory的凭
- Qt for Windows:Qt 5.11.0 MinGW 静态编译版本(
- windows-server-2008 – 从SBS 2011迁移到2008 S
- 使用3 uint8_t的C中的多数函数
- windows – IT工作人员代表团的建议
- Windows10系统运行bat文件 一闪而过 解决
- 如何在Windows用户的RDP会话中查找支持,我在哪里
- 那里有没有工作和完整的1-Wire .NET库?