
We understand the role of Selenium WebDriver in automating web based tasks and testing functionality of web applications. We understand what WebDriver is and that all actions are performed within the context of a WebDriver.
Selenium has a great suite of additional tools to assist with web testing such as Selenium RC, Selenium IDE and Selenium Grid. We give a quick overview of these technologies and what they do.
We'll set up our a Selenium project in IntelliJ using the Maven template. Maven is an easy way to get the selenium dependencies in 1 simple step!
Our first hands on Selenium test. We'll load a webpage and check its title.
When you interact with a webpage, you do so by interacting with specific elements on the page. This example demonstrates how to find a specific element using its class name attribute.
Selenium is a specialized, easy-to-use framework for automating interactions with web browsers, whether it’s to test the functionality of web apps that you’ve developed or to automate boring and repetitive tasks or to perform activities like scraping websites.
In this course, we’ll be working with Selenium’s Java API to test browser functionality and automate tasks using nearly 45 solved examples of use cases you might encounter on a regular basis. We’ll look at scenarios like
1) scraping websites for specific elements identified by HTML tags, CSS selectors
2) Testing User interactions of all kinds as click, entering text, drag and drop, selecting from dropdowns
3) Automating Browser Navigation and Handling cookies
4) Switching between your main browser window and pop-up alerts, embedded iframes
5) Interacting with HTML5 based elements like video players
6) and Parallelly running tests across multiple browsers and platforms from your local machine using Selenium Grid
Selenium makes automating all the tasks we’ve mentioned very straightforward but as your tasks get more and more sophisticated you’ll want to use best practices to structure your code. We’ll talk about the Page Object Model design pattern and how you can use it to design testing scripts that are easy to maintain.