There are several ways to set up your web (selenium) test automation. You can directly create test functions where the web elements are invoked. This can be done quick, but is quite dirty and at some point, the code base will grow, and maintainability will be an issue. Furthermore, it doesn’t have any structure and redundancy of code and debug “horror” will overwhelm.
Sooner or later you need to map the data into web elements. Typically you are dealing with web forms where you have to enter a set of data. In most cases the input fields have a pattern, e.g. Continue reading
In many cases you need to wait for a website response to get visibility of various web elements. This means you are not able to get hold of the web element until it is visible or clickable. Continue reading
In many cases you don’t want to start a browser for every test scenario. Ideally, you want to use the same resource for multiple test scenarios.
It is a no brainer, but how do you hold (reuse) the same browser/webdriver for multiple selenium test scenarios?
There are various tools where web testing can be achieved. One of the better tool is selenium. This blog will demonstrate basic web testing with selenium webdriver and Java. This blog assumes that you already have basic Java programming knowledge.
- Java 8 SDK
- Chrome browser (using chrome webdriver)
- Webdriver manager