I am trying out WebDriverBacked selenium. I used the below code. But, it gives me
“System.NotSupportedException : command” exception.
IWebDriver driver= new FirefoxDriver();
Selenium.WebDriverBackedSelenium selenium= new WebDriverBackedSelenium(driver,myUrl);
selenium.Type(locator,value);
Here the command gets replaced by any selenium statement I execute after instantiation. I’ve written “Type” just as an example. I throws exception at any selenium command.
I’m using c# for RC.
Can someone point out, where I’m going wrong over here?
Thanks,
Vamyip
The .net version of Webdriver (Selenium 2) does not have WebDriverBackedSelenium implemented yet. Also Webdriver doesn’t handle Alerts right now. A defect has been written and I believe FirefoxDriver code is almost done.
If you want to convert the code from Selenium to Webdriver you will need a complete rewrite since the API is different.
Example to click in Selenium:
driver.Click("id");
While in Webdriver it’s:
driver.FindElement(By.Id("id")).Click();
Also Webdriver is missing some of the features in Selenium, such as istextpresent and doubleclick.