0
votes

Guys I am still having following issue with remote webdriver. Can you please help me in this:

DesiredCapabilities capability = new DesiredCapabilities();

capability.SetCapability(CapabilityType.BrowserName, DesiredCapabilities.InternetExplorer());

capability.SetCapability(CapabilityType.Platform, new Platform(PlatformType.Windows));

capability.SetCapability("webdriver.ie.driver", @"E:\WebDriver\Browser\");

string host = "localhost:4444/wd/hub";

RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://" + host),capability);

Then I get following error:

Additional information: The path to the driver executable must be set by the webdriver.ie.driversystem property; for more information, see http://code.google.com/p/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://code.google.com/p/selenium/downloads/list

1
I see you've opened three separate threads for this question, which makes it a bit more difficult for other users to help you, and it clutters the list needlessly. I'd recommend keeping discussion to a single question to a single thread in the future. That all said, my answer is below. - tim-slifer

1 Answers

0
votes

It looks like you don't have the IEDriverServer executable on your path. Try downloading the IE Driver from seleniumhq.org, extract the zip file to a folder on your machine, and add this folder to your PATH variable on your system.

This must be done on the machine on which you intend to actually run the test in a browser. If you're running a selenium-standalone-server on your local machine, you'll need the above performed on your local machine. If you're expecting a browser on a remote machine (A Grid Node), then you'll have to perform this operation on that machine in order for it to work.

You can then simplify your DesiredCapabilities a bit.

capability.SetCapability(CapabilityType.BrowserName, "internet explorer");

This will instruct the RemoteWebDriver to use a machine with IE available. As you've done in your example, you can also then further tune your capabilities with a Platform and Browser Version if need be.