As part of explaining all the new features in the latest Selenium IDE, I will explain executing Tests on Internet Explorer browser using Command Line Runner in Selenium IDE.
Let’s get started.
New Selenium IDE – Executing Tests on Internet Explorer browser using the command line runner
Follow the below steps for executing the Selenium IDE tests in Internet Explorer browser using the Command Line Runner (i.e. SIDE Runner)
1) Let’s record a sample test in Selenium IDE as shown below:
Save the project having this Test into any folder in your machine as shown below:
2) If not configured, configure the Command Line Runner (i.e. SIDE Runner) using the steps provided at the below link:
New Selenium IDE – Configuring Command Line Runner (SIDE Runner)
Note1: We have to install the ie driver in the command line as explained in the above article.
Also, we have to make sure of the below things in IE browser:
Open IE browser, select Tools > Internet Options as shown below:
In the displayed ‘Internet Options’ dialog, click on the ‘Security’ tab and make sure all the below options are enabled as shown below:
3) If we have to execute Selenium IDE Tests on the Internet browser, we have to execute the below command in command line runner:
selenium-side-runner -c "browserName='internet explorer'" C:\Users\arunm\Desktop\Projs\Project1.side
Note: The above command provides the browser on which the test to be executed (i.e. Internet Explorer), followed by the Path of the Selenium IDE saved Test file to be executed.
Observe that the Selenium IDE Test will result in the failure on execution – ‘IEDriverServer.exe could not be found on the current Path’ message will be displayed as shown below:
4) Go to seleniumhq.org/download page and click on the below link of IE Driver as shown below:
The Internet Explorer driver for windows will be downloaded as shown below:
Extract the above-downloaded IE driver zip file and keep it in any folder in your machine as shown below:
Now set the path of the above IE driver in your machine by following the below steps:
First, copy the path of the folder in which the downloaded IE driver exe file is available as shown below:
Open any folder as shown below:
Right-click on ‘This PC’ option and select ‘Properties’ as shown below:
Click or select on the different links, options in sequence as shown below:
In the displayed ‘Edit Environment variable’, click on ‘New’ button and then paste the path copied in the above step and click on the ‘OK’ button until all dialogs close:
As we have set the path of IE Driver in our machine and in order to execute Selenium IDE Tests on Firefox browser, we have to execute the below command in command line runner:
selenium-side-runner -c "browserName='internet explorer'" C:\Users\arunm\Desktop\Projs\Project1.side
Note: The above command provides the browser on which the test to be executed (i.e. Internet Explorer), followed by the Path of the Selenium IDE saved Test file to be executed.
Observe that the Selenium IDE Test will be executed in the Internet Explorer browser as shown below:
Once the Selenium IDE test is executed completely on Internet Explorer browser, the test results will be displayed as shown below:
Here concludes the practical demonstration of executing Selenium IDE tests on Internet Explorer Browser using Command Line Runner.
In the next article, I will practically demonstrate another new feature in the latest Selenium IDE. (new features in the latest Selenium IDE)
Next Steps:
- > Check complete Selenium Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
On a mission to contribute to the Software Testing Community in all possible ways.
Please help with this error. I have followed all the above mentioned steps but still steps are not executing even if the page is loaded.
Timeout – Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Timeout – Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error:
8 | jest.setTimeout(300000);
9 | describe(“Default Suite”, () => {
> 10 | it(“test”, async () => {
| ^
11 | await tests[“test”](driver, vars);
12 | expect(true).toBeTruthy();
13 | });
at new Spec (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
at Suite.Object..describe (DefaultSuite.test.js:10:3)
● Default Suite › test
TimeoutError: Timed out waiting for page to load.
at Object.throwDecodedError (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/error.js:550:15)
at parseHttpResponse (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:560:13)
at Executor.execute (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:486:26)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 416.105s, estimated 655s
Ran all test suites.
Yes, Selenium IDE has some command line runner (i.e. side runner issues). Applitools team is still working on such issues.
As the side runner feature is new in Selenium IDE, we have to wait for this feature to get stable.
You can always reach Applitools.com regarding your issues.
hi,
I am getting the following error when i run it using IE. I t works fine with Chrome and Firefox.
Error:
Test suite failed to run
Do not know how to build driver: internet; did you forget to call usingServer(url)?
at Builder.build (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/index.js:692:15)
at buildDriver (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/jest-environment-selenium/dist/index.js:66:17)
at WebdriverEnvironment.setup (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/jest-environment-selenium/dist/index.js:37:32)
Test Suites: 2 failed, 2 total
Tests: 0 total
Snapshots: 0 total
Time: 1.409s
Ran all test suites.
Please Help