What is browser-based testing

Test web interfaces automatically with Selenium

Call up the website, fill out the form, click on the button, check whether the correct text is displayed. Testing web applications is easy, but stupid. A developer has to repeat these three steps after every change to the source code, just like numerous other processes. Even with tiny bug fixes, he should definitely not save himself this work, because every change could have side effects that he overlooks. There is no way around automatic tests so that the developer still has time to develop.

Selenium allows exactly such automatic tests of web GUIs. The framework controls the browser like a human would. That means, it clicks on links and buttons, fills out text fields or selects entries from lists. If the browser shows its surface, you can even watch the computer operating the website as if by magic.

Selenium has been developed as free software since 2004 and is under the Apache License. The framework comes with a number of bindings so that it can be used from Java, C #, Ruby, JavaScript (with Node.js) and Python. We show Selenium's magical abilities using a tiny demo app in Python. The web application programmed with the Python framework Flask shows funny combinations of first and last names and explains the joke if necessary. That's why we also use Selenium's Python binding for the tests. Selenium does not run the tests itself, nor does it check them. The module supplied with Python takes care of this.