Reputation: 1849
Good morning in my timezone.
I am building Selenium 2.0 tests, and i am using IEDriver.I am following the instructions in this reference InternetExplorerDriver.
I should put the executable on my %PATH%(i am working in Windows OS).The problem is i do not have access to the System properties , to configure the PATH environment variable,because i am working in outsourcing regime to my client and in the client company.I am using Eclipse IDE. I am able to open a cmd window and configure the path environment variable, but this variable is temporary just to that window, so to be able to run selenium tests, i would have to run my selenium tests(i am using simple class with main method in the beginning) through command line commands in that window(i can use ANT for example), this will work ? If i want to run my tests directly through the ECLIPSE IDE , how can i configure the PATH environment variable so that ECLIPSE will run the tests ?
Thanks in advance
Best regards
Upvotes: 0
Views: 141
Reputation: 1036
You are not required to add the IEDriverServer.exe in your PATH variables, you can also do this through your code
System.setProperty("webdriver.ie.driver", ABSOLUTE_FILE_PATH_HERE_FOR_IE_DRIVER);
Also make sure that the file path is executable, and later you can initialize your web driver as.
DesiredCapabilities sCaps = DesiredCapabilities.internetExplorer();
sCaps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
sCaps.setJavascriptEnabled(true);
WebDriver driver = new InternetExplorerDriver(sCaps);
Hope this helps you :)
Upvotes: 1