Selenium Overview

Selenium is an automation test framework, it is mainly used to test web applications, it is open source and free. With this tool, test cases can be run directly in web browsers just like a real human operate the web browsers. It supports a lot of web browsers(Chrome, Firefox, IE, Opera, Safari, etc). Selenium also has a lot of different sub-tools to support different automation test approaches.

Users can use a lot of main programming languages (java, python, PHP, Javascript, c#…etc) to write test case scripts in selenium. Then run the script to verify test cases in most main web browsers. Not only those automation test scripts can be run in Windows, Linux, macOS, they can also run on mobile os like android, ios and windows mobile.

This test tool for the functional tests is recognized as the most portable test framework in all open-source test tools, especially for web application automation.

1. Selenium Automation Tool Suite Components Introduction.

1.1 Selenium Automation Tool Suite Components Overview.

  1. There are four tools in this automation tool suite, each for a special test requirement.

1.2 Selenium Integrated Development Environment( IDE ).

  1. Selenium Integrated Development Environment( IDE ) components diagram.
  2. As a Firefox or Google Chrome plugin, selenium IDE can be used to create test script prototypes quickly and easily.
  3. It can record human tester actions as a script (in any programming language) while the tester runs the test case manually.
  4. The recorded test script can be executed later for regression test automatically.
  5. This tool can access the browser’s DOM (Document Object Module) elements using Javascript.
  6. It also provides a flexible interface for testers to create or update test cases.

1.3 Selenium Remote Control (RC).

  1. Selenium Remote Control (RC) components diagram.
  2. Selenium RC is the main feature of selenium. The tester can use it to simulate user actions (such as click button, submit an Html form, input data in text box) in web browsers.
  3. When the web browser is loaded in the test script, it injects a suite of Javascript into it. Then use these Javascripts to interact with the web browser.
  4. Typical Usage For Selenium RC:
    1) Tester write test case script with supported programming language API.
    2) When the test script is running, it opens a web browser and injects selenium core which is just a suite of Javascripts, then uses these Javascripts to execute the command.
    3) Test script send command to RC server.
    4) RC server receives these command and trigger selenium core to execute the commands and interact with browser page web elements.

1.4 Selenium Webdriver.

  1. Below is the selenium webdriver components diagram.
  2. Webdriver is the main new feature added in selenium 2. Webdriver aimed to deliver an easy and helpful programming interface to resolve the limitations of Selenium RC programming API.
  3. Different from selenium RC, webdriver uses browser native support to interact with web pages. So different browser has different webdriver driver library and different features. All these are decided by the web browser that runs the test cases.
  4. The implementation of webdriver is highly related to the web browser. So there are the following webdriver drivers.
  5. HttpUnit Driver: The fastest and lightest webdriver implementation. Based on HttpUnit, it can be run across Windows, Linux, macOS because of its pure java implementation.
  6. Firefox Driver: Easiest to configure and use. Used to run test scripts in Firefox web browser. Do not need extra configuration to use.
  7. Chrome Driver:  Used to run test script in google chrome web browser, need more configuration to use.
  8. Internet Explorer Driver: Used to run test script in internet explorer web browser, need more configuration to use. Can only run in windows os, slower than Firefox and Chrome web driver.

1.5 Selenium Grid.

  1. Below is the selenium grid components diagram.
  2. With the selenium grid, test scripts can be run on multiple machines at the same time.
  3. This can reduce the total test scripts run time.
  4. The selenium grid can also make bug finding more quickly because the test cases run quickly.
  5. This is suitable for big software with too many test scripts to run.
  6. We can also choose to test different web browsers on different machines. You can configure browser version, os, and machine to run the test case by using selenium RC’s Capabilities.

1 thought on “Selenium Overview”

  1. I am fresh new to selenium programming. I want to use python to write a selenium automation test script. And the test script should operate web page elements with javascript. My question is how does selenium use javascript to operate the web page? Does selenium translate all the python source code to javascript? Thanks a lot.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.