fbpx

Using Selenium to test websites is a fantastic way to keep on top of your website’s health and it is really easy to use.  XRF Digital staff member Nick Taylor our Project support/tier 1 explains selenium…..

What Is Selenium Testing

Selenium is a programme that records your manual testing of all of your pages/functions on your website, so every time you want to test your website you don’t have to do it manually, it will save so much time and hassle, if anything is not working the test will flag it straight away and end the test.

How I Use Selenium In My Role At XRF Digital

I usually create individual sections within a test.

First, I would make a page verification test that tests the pages and text on the website is verified. Then if the website has logins and different user types I would create a customer log in test, admin log in test, these will be individual tests within the overall test, I do this because it is better to split up each part of the test, so if anything fails to test, it is easy to pinpoint as the test is smaller than if I had one test that covers all parts of the website.

Once I have completed testing for each section then I can select to play all the tests in order, for example, I always start with page and text verification, then it would be user logins, then purchases, I always delete the user account at the end of the test so that it does not duplicate accounts (email already taken) so selenium records deleting the account so it can do the cycle again without failing because of a duplicate account.

Now I will press the ‘run all tests’ button, the tests should now all run one after another, it’s very satisfying when all tests you have created for a website run through without fault.

For more information take a look at the Selenium website – link to selenium home page

Advantages of Selenium

  1. Open Source Software

Selenium is an open source software. It has no upfront, out-of-pocket costs. You can simply go to the official website and download it free of cost. As if that were not enough, the support for the tool also comes absolutely free from a wide community of users.

  1. Supports Multiple Programming Languages

Another advantage of working with Selenium is that you are free to work in any language. Although it has a scripting language of its own, the tester is not restricted to writing in that particular language. Why? Because Selenium is quite robust when it comes to language support and can efficiently support every tester’s language bindings. This includes C#, PHP, Java, and JavaScript, among others.

  1. Scripts Can Be Re-Run

Selenium supports recording scripts being run in the browser under test run mode. An interesting point to note here is that you may save these scripts and re-run them whenever you want.  Not just that, you may even create Selenium tests manually using web development tools like Firebug.

  1. Works On A Lot Of Browsers

Yet another feature that illustrates the robustness of Selenium is that the tests can be run under multiple browsers without any major restrictions. Not just that, but the tool deploys well on multiple environments like Windows, Linux, and macOS. Therefore, whatever browser you are working in on whichever platform, you are able to use Selenium.

  1. Integrates Well With Other Tools

Selenium is quite a cooperative tool when it comes to coupling with other third-party tools or software. It puts no restrictions on the tester’s choice regarding any aspect of the testing framework. It integrates efficiently with third-party tools. You can also use Selenium on other cloud-based online grids like LambdaTest.

Photo: Nick, when he is not testing websites… he eats pot noodles!

The Importance Of Selenium Testing

Selenium testing has been a revelation when testing customer websites, it has allowed us to send a more polished final product to the client and by retaining those tests we can use them to pinpoint any faults that may occur in the future, it has been a real timesaver for me, before selenium I was testing websites manually and this could take hours, or even days depending on the scale of the website, using selenium it can run a full test on a website in a matter of minutes, sometimes even seconds, if your website sells things you can test purchasing items with selenium too (make sure to use the test stripe card) it can test any functions you may have on your website.

Once a test has been completed I will record the process at a slowed down speed and send the video of the test to the customer so they can see the process of the Selenium test, so it reassures the client that their website is running as it should, with no faults. I could also send the actual Selenium test file so they can run the test whenever they like if they feel something isn’t working with the site as it should. It’s a very handy tool for testers and clients, it’s very user friendly and easy to use, even non-technical people would be able to run a Selenium test.

If you want to try Selenium yourself why not take a look at the video below…

Let's Talk Start Now