Quality Testing

Quality is delighting customers

Selenium - How does it work

How does selenium Work?

Any Selenium Automation script requires a JVM and this JVM is created by the Selenium RC server. Therefore when you run selenium the first step is to run the Selenium RC server from the command prompt. You can use the Java -jar command.
The file name is Selenium-Server which comes with the download of Selenium RC server.

Next once this server is running in the background you can see the port number as 4444 and jetty server activated in the command prompt......

Keep it minimized all the time......Now coming to the interface you use (NetBeans/Eclipse/Intellij)........

Open the interface and inside this interface you can write the Main class that behaves like a driver script in Selenium. This file is a simple Java file if you choose to use Java in combination with Netbeans/eclipse/Intellij

Now all your testscripts will be in Java code and these will be triggered from the driver file which is the main class........inside the interface.....

So when you trigger the scripts from inside the interface the interface sends the scripts to the RC server and the RC server talks to the Browser session opened inside the JVM. Remember Selenium RC server works with Mozilla only not IE.......and since Java support is by default enabled within Mozilla browser your test script is easily understood by the builtin interpreter of the browser and with the help of Java client drivers (Jar files) it is easy to execute your test script on the application.

Remember since RC server executes your script within the JVM you can still continue other activities on your machine this will not affect test script execution.......So this is a advantage with Selenium.........

Selenium RC server also enables us to parameterize the scripts just like QTP however Selenium IDE has limited features to parameterize the scripts......Hence RC server is preferred than the Selenium IDE......for simple scripts you can choose to use Selenium IDE........

So this is how selenium is able to execute the automation scripts that you write in the interface and run it on the Selenium RC Server.........

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service