Automated web browser testing using Selenium

Our team of testers has recently been using Selenium for automated web browser testing, appreciating its features when creating test cases. There are two options when creating a test case - tester can use either Selenium IDE or Selenium API for Java. When using Selenium IDE, it is possible to create test cases using:

- Recording feature – it is possible to record the steps of a test by simply hitting the record button and performing the test manually.

- Writing scripts in Selenese – test scripts can be written in Selenium IDE by using Selenium language (Selenese), which are simple commands that we can use to perform actions on target web elements and optionally also provide value that the elements should have.

While the above mentioned recording feature and Selenese can be used to create some simpler test cases, experience shows that programming the test cases provides much more flexibility – If Selenium IDE is not powerful enough for one’s needs, another option is to use:

- Programming test cases – Selenium API is available for numerous programming languages – at enprovia we use Selenium API for Java to our great satisfaction. This enables us to create powerful test cases with features which can be shared in a number of automated testing projects. So far, we’ve implemented the following features into our test suite:

- Taking screenshots when a test case fails
- Screen recording while test case is running – when a test case starts, desktop streaming is launched via VLC Media Player, which is called by a .bat file that is launched at the beginning of every test case. If a test case passes, the screen recording file is deleted, if it fails, it remains stored.

Add a Comment