As part of explaining all the new features in the latest Selenium IDE, I will explain performing execution of Tests on the SauceLabs cloud platform using Command Line Runner in Selenium IDE.
Apart from executing Selenium IDE Tests in your local machine, we can also execute the Selenium IDE Tests in a remote machine which is hosted on the cloud by the Cloud Platform Providers like SauceLabs.
SauceLabs is a cloud platform where hundreds of browsers, operating systems, and devices combinations are readily available for us to utilize.
For example, if have to test our web application for 10 days on Windows 10 Firefox browser and you don’t have this device with this configuration with you. In this case, you can don’t have to purchase the machine having the needed configurations, instead, you can simply purchase a license account with SauceLabs and you will not only get the required environment but also you will get hundreds of other device OS and browser combinations along with it.
And all these combinations of devices, OS and browsers are hosted on the cloud (i.e. Internet).
Using the command-line runner, we can execute the Selenium IDE Tests in one of the environments hosted in the SauceLabs.
In this article, I will practically demonstrate executing Selenium IDE Test on SauceLabs cloud environment having the Windows 8.1 Internet Explorer 11 environment.
Let’s get started.
New Selenium IDE – Executing Tests on SauceLabs
Follow the below steps for executing the Selenium IDE tests on SauceLabs using the Command Line Runner (i.e. SIDE Runner)
1) First, as explained in the previous article – Execute a sample Selenium IDE test on the Internet Explorer browser in your local machine (Executing Tests on Internet Explorer browser using the command line runner)
2) Follow the below steps for executing the above sample Test on SauceLabs – Windows 8.1 IE 11 platform.
Go to https://saucelabs.com/ and register for a free trial account by clicking on ‘Try it for free’ button as shown below:
3) Provide the account details in the displayed page and create an account as shown below:
4) Login to the SauceLabs account and click on ‘User Settings’ option as shown below:
5) In the displayed page, copy the Username and Access key as shown below:
Access Key: 7767ae66-1c04-4071-ada4-fd802113d382
6) 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:
7) In order to execute Selenium IDE Tests on the Internet browser in SauceLabs Cloud environment, we need to execute the command in Selenium Side Runner as shown below:
selenium-side-runner --server http://<span style="color: #ff0000;"><strong>arrampriyanka2009</strong></span>:<span style="color: #0000ff;">7767ae66-1c04-4071-ada4-fd802113d382</span>@ondemand.saucelabs.com:80/wd/hub -c "browserName='internet explorer' version='11.0' platform='Windows 8.1'" C:\Users\arunm\Desktop\Projs\Project1.side
In the above command, red color text is the Username of SauceLabs account and blue color text is the Access Key of SauceLabs for executing tests on its cloud-hosted platforms.
Note: We have also specified the platform specifications like Windows OS and Browser versions on which the Test needs to be executed in the SauceLabs in the above command itself.
Observe that on executing the above command in the Command Line Runner, the Selenium IDE Test started executed in the SauceLab Cloud Platform as shown below:
8) Once the execution is completed, check the results as shown below:
Click on the Completed Job in SauceLabs as shown below:
In this displayed page, click on the video play option to see the proof of execution of the SauceLabs Cloud Platform as shown below:
Here concludes the practical demonstration of executing Selenium IDE tests on Windows 8.1 Internet Explorer Browser 11.0 using Command Line Runner in SauceLabs Cloud Platform.
In the next article, I will practically demonstrate another new feature in the latest Selenium IDE. (new features in the latest Selenium IDE)
- > 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.