“Unknown command received” errors using MicrosoftWebDriver and Selenium (C#)

十年热恋 提交于 2019-12-12 05:12:05

问题


I am using Selenium (v2.47) and the Microsoft Web Driver (v10.0.10240.0). I am working with some existing C# code that already runs fine on Firefox, IE and Chrome and I want to use it to test the new Edge browser on Windows 10. My code is able to successfully open the browser and navigate to my login page. However I get an "Unknown command received" exception when I do a few basic things such as:

1) maximize the browser

2) call .FindElement(by) on an existing IWebElement.

For example:

driver.Manage().Window.Maximize(); //throws exception

...

IWebElement parent = driver.FindElement(By.TagName("body")); //works

...

parent.FindElement(by); //throws exception

Has anyone seen either of these work with Selenium and C# for the Edge browser? Maybe I am doing something wrong here. Or does "Unknown command received" just mean it is unimplemented functionality that will come in the future?


回答1:


There was a fair amount of missing functionality in the initial (10.0.10240) Edge driver release, including missing support for IWebElement.FindElement(). Subsequent releases, which also required an update to Edge itself via Windows 10 updates, and until very recently only available via so-called Insider builds. A full accounting of what was implemented and when is provided by Microsoft at their WebDriver implementation status page.



来源:https://stackoverflow.com/questions/33686660/unknown-command-received-errors-using-microsoftwebdriver-and-selenium-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!