I have all my tests run in a ubuntu box. The tests are written in PHP. They work all fine with the firefox driver and chrome driver. I'm using a standalone selenium server(selenium-server-standalone-2.25.0.jar) which runs in the same box. Lately I need to write test against the IE platforms. I've tried a few things but up to this point I'm still not sure what's the correct way to set the IE driver for my particular scenario.
I've tried to install IE with mono in the same ubuntu box but I got lots of problems during installation, and after I got rid of those problems and made it so that I could run IE from my command line, it still didn't work for my tests.
I read through this particular documentation here: http://code.google.com/p/selenium/wiki/InternetExplorerDriver and followed through on a windows box, until I saw this:
The HTTP server started by the IEDriverServer.exe sets an access control list to only accept connections from the local machine, and disallows incoming connections from remote machines. At present, this cannot be changed without modifying the source code to the IEDriverServer.exe. To run the Internet Explorer driver on a remote machine, use the Java standalone remote server in connection with your language binding's equivalent of RemoteWebDriver.
so I downloaded selenium-server-standalone-2.25.0.jar to the windows machine and started it; my IEDriverServer.exe was put into C:\windows\system32\ which is in my PATH. Then I changed the code in my ubuntu box to point to the selenium server running on the windows box. But still no luck.
I googled a bit, and there are cases people successfully got it running. But they seems to be using a java binding or c# binding which I suppose they are developing on a local box. I haven't found a working case that's like mine that's:
a ubuntu box where PHP based tests run connection to a remote selenium server running on windows. a windows box with a selenium standalone server running and with IEDriverServer.exe in PATH
Thanks.
When the Selenium server and hub are connected and running, you can write a test case using RemoteWebDriver. To run a remote WebDriver client, first, connect to RemoteWebDriver. Point the URL to the address of the server running the tests. Also, set up the desired capabilities to customize the client.
Selenium Remote Webdriver: It is an class that is used to execute the browser automation and to execute assessments in a distributed environment or on a remote computing device. In other words, It is a class that implements the WebDriver interface and this action is performed on the remote server.
I had a similar problem - working on Linux and wanting to run my WD tests against IE 11 - and got it to work. The main difference between me and the OP is that my tests are written in Java.
My goal was like this:
What I did:
- The IEDriverServer executable must be downloaded and placed in your PATH.
- On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
- Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.
- The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
- For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates. For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.
Note I didn't need to put IEDriverServer.exe
's location in the PATH, and couldn't find "Enhanced Protected Mode" in my IE 11 settings (so didn't do that).
java -jar selenium-server-standalone-2.53.1.jar
IEDriverServer.exe
Edited the set up section of my tests to use RemoteWebDriver
, like so (192.168.56.101 was the Host Only Network IP of the Windows box):
DesiredCapabilities capability = DesiredCapabilities.internetExplorer();
driver = new RemoteWebDriver(new URL("http://192.168.56.101:4444/wd/hub"),
capability);
mvn test myproject
And it worked! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With