Selenium Tutorials

If you are a beginner, please Proceed here to start from the beginning.

How to do Database testing using Selenium Webdriver Framework Example

In previous tutorial, we have discussed about database testing and JDBC Java API which is primarily used to connect and interact with Database. Check out the simple example of Database testing with selenium.

In this tutorial, we will discuss how to perform database testing in different environments and pass the parameters to different methods in a simple way.

Database testing using Java, Selenium, TestNG example

As we know every application has to maintain a database like My SQL, Oracle or any other databases to store all its data. And where as Selenium Webdriver is used for testing web applications and we perform many operations like submitting information and some times retrieving information and validate them.

In selenium scripts, when there is a need of getting the Data from the database we may have to use APIs which helps to interact with database like JDBC.

Handling Untrusted SSL certificates in Firefox browser

Before jumping on to the example, first let us see What is SSL Certificate and When do we get UNTRUSTED CONNECTION Alert / Error.

Firstly, WHAT IS SSL CERTIFICATE ?

SSL is used to keep sensitive information which is sent across the Internet encrypted so that only the intended recipient understand it. This is important because, the information that we send on the internet is passed from one system to other system to the destination server.

How to verify tooltip text with selenium webdriver using java

When user mouse hovers an any item (Button/link/field etc), without clicking it, and a tool tip may appear with information about the item being hovered. And Some times it may require us to check for the tooltip text.

There are different ways in showing tool tip to the user. We will look into two such different examples, one is with simple HTML and other example with Jquery ToolTip.

Example#1:

Let us take selenium official website to verify the tooltip in the first case.

Find out broken links on website using selenium webdriver and HTTP Client

Earlier we have seen working with finding broken images, now here we will see finding invalid URLs. Here a valid URL will always have a status with 200. We have different HTTP status codes which are used for different purposes. You can check Wiki page for more information on HTTP Status Codes

Here 2xx class of status codes indicates that the action request by client was received and processed successfully without any issues.

Find Broken / Invalid Images on a Page

There are cases where we have seen image loading is failed due to many reasons, the most see is "Image not loading - Failed to load the given URL” because of image file is not located in the same location as that is specified or may be image file is corrupted. And it will be very difficult to identify invalid images when there are many in the applications.

Handling Authentication Window with WebDriver (In Firefox, Chrome and IE)

When you are working in a test environment, Stage or Pre Production, there are cases where you may need to work with applications which are secured with Authentication (Basic Auth).

When ever you enter the URL, it will prompt you to enter the User name and the password and It will not allow to perform any further operations until you provide username and password. And this Authentication pop-up is not a JavaScript pop-up, it is a Browser dialog window which selenium cannot handle simply using sendKeys method which we do for normal JavaScript pop-ups..

Extract PDF text And Verify Text Present in PDF using WebDriver

Most of the applications has 'Print PDF' functionality. How to achieve this in Automation. we first need to decide is this really required to automate, if your answer is Yes then proceed further to see how we can achieve this. In Earlier tutorial we have seen validating if the file downloaded or not after clicking on download button. In this tutorial we will now see to validate Print PDF functionality by using below two ways.

There are multiple ways of doing this.

Element is not clickable at point SeleniumWebdriverException

This issue comes only when working with chrome driver as the chrome browsers uses point location. When the element position is not fixed and we are trying to do some action on that particular element will result an error as 'selenium.common.exceptions.WebDriverException - Element is not clickable at point (xx, xx). Other element would receive the click'.