Selenium IDE is one of the most popular record and playback tool for testing which is widely used for automated browser testing. The Selenium IDE is a very easy-to-use solution for getting started with automation testing. It also provides instant feedback and has cross-browser and operating system compatibility, with the help of Selenium IDE (SIDE) Runner.
In this article, we will see how to run Selenium IDE tests on LambdaTest Selenium Cloud Grid.
1 |
npm install -g selenium-side-runner |
For the demonstration of executing Selenium IDE tests on the LambdaTest grid, we’ll create a test suite that comprises of four test cases- two to perform a search for ‘LambdaTest’ on Google & DuckDuckGo, and the other two to perform a search for ‘LambdaTest Blog’ on Google & DuckDuckGo.
The parallel testing on the Cloud Selenium Grid works only when the tests are executed using the SIDE Runner, and not the Selenium IDE. So we will enable the Parallel testing for Selenium IDE.
We have successfully activated Parallel Testing in Selenium IDE. Now we can execute tests Selenium IDE tests in parallel on LambdaTest Selenium Cloud Grid.
Set the Desired Capabilities in Selenium. For this article, we have set the Chrome browser (version 72.0) for Windows 10, to run our Selenium IDE tests.
The LambdaTest Selenium Desired Capabilities Generator is used to generate the capabilities. Below are the desired capabilities used in this article for the required test combination, provided in Python Language.
1 2 3 4 5 |
capabilities = { "platform" : "Windows 10", "browserName" : "Chrome", "version" : "72.0" } |
In the string format, it will be represented as:
1 |
"browserName='chrome' version='72.0' platform='Windows 10'" |
1 |
https://user-name:access-key@hub.lambdatest.com/wd/hub |
1 |
selenium-side-runner --server <LambdaTest Grid URL> --capabilities <Browser Capabilities> |
Mention the number of parallel processes to be executed at a time. You can use any of the below syntax to specify the count of parallel processes to be executed at the above mentioned Grid URL:
1 |
selenium-side-runner --w <num of parallel processes> --server https://user-name:access-key@hub.lambdatest.com/wd/hub |
OR
1 |
selenium-side-runner --max-workers <num of parallel processes> --server https://user-name:access-key@hub.lambdatest.com/wd/hub |
For this article, we have set the number of parallel processes as ‘4’
1 |
selenium-side-runner -w 4 "LambdaTest-IDE.side" --server https://user-name:acces-key@hub.lambdatest.com/wd/hub -c "browserName='chrome' version='72.0' platform='Windows 10'" |
We have successfully executed all the steps to run Selenium IDE tests on LambdaTest Selenium Cloud Grid. Now you can see our tests being executed along with their status in the Automation Timeline of your LambdaTest profile.
Below are the execution snapshots of the SIDE Runner and the automation timeline instance, that shows the successful execution of the desired tests:
You might have lots of individual tests in a single test suite to test all features of a site. When you run these tests normally, you might experience that the test suites get broken into individual tests, thereby requiring a new session and the variables being passed again each time.
Selenium IDE provides the feature to overcome this as well. In order to run multiple test cases within the same test suite with a single instance of a browser, the Persist session option in the Selenium IDE can be used. Below are the steps for how to do so:
1 |
selenium-side-runner --params "a='example-value' a.b='another example-value' a.b.c=[1,2,3]" |
Congrats! We have successfully executed our Selenium IDE tests on LambdaTest Selenium Cloud Grid, which allows you to perform live interactive and automated cross-browser testing on 2000+ real browsers and operating systems online.