Submitted by harrydev on Fri, 03/06/2015 - 14:29
It is very important to verify if the file is downloaded successful or not. Most of the cases we just concentrate on clicking the downloaded button. But at the same time it is also very important to confirm that file is downloaded successfully without any errors or if some other file is getting downloaded.
In most of the cases we know which file is getting downloaded after clicking on download button / link. Now when we know the file name, we can verify using java for the 'File Exists' in a downloaded folder location which we specify.
Submitted by harrydev on Fri, 02/27/2015 - 23:06
Normally when ever we want to change the size of an element we do with the help of mouse manually. Now we will see to resize / change the size of an element using webdriver actions class with moveByOffset which moves the mouse position from its current position by the given offset.
Below are the simple steps thats needs to be followed for the below example:-
Submitted by harrydev on Sat, 02/14/2015 - 10:45
When ever we are testing the applications, we may require css value of the element. Say now we need to check the scenario of a button color/state getting changed or not when we do mouse hover.
To check this, we can check the css values that are changing when we perform mouse hover on the element.
Now let us take an example of 'Google Search' button in google home page.
Submitted by harrydev on Sun, 02/08/2015 - 03:23
There are cases where you want to get the attributes values and then perform any action.
In the below, if you see, button tag which has multiple attributes 'name', 'id', 'class' and 'aria-label' and has values for each attribute. To get the attribute value using selenium webdriver, we can use 'element.getAttribute(attributeName)'.
If we try to get the attribute value that doesn't exists for the tag, it will return null value.
Submitted by harrydev on Sun, 01/18/2015 - 04:02
Submitted by harrydev on Sat, 01/10/2015 - 12:19
In this tutorial, we will see how to work with Date Picker by taking different calendars. We will take three different calendars and see how to work with them. There are different date pickers used in applications example JQuery date picker, KendoUI date picker etc.
Submitted by harrydev on Thu, 01/01/2015 - 12:49
Now a days, in most of the applications, we can see a 'Auto Complete' textboxes which will help users to quickly find the option from a pre-populated list of values based on the text that is entered by the user. It mainly concentrates on providing suggestions to users while typing into the field.
Let us now see a basic example. When we enter any text, we can select the value from the pre-populated list by using 'String' or 'Index value'
Submitted by harrydev on Thu, 01/01/2015 - 10:55
We will show how to work with context menu by taking a simple example. In the below example, we will first Right click on the element and the select the required option from the list of values. In the example we have also switched to an alert to verify if we have successfully clicked on the required link by using TestNG asserts
Submitted by harrydev on Thu, 01/01/2015 - 01:44
We will take an example to double click on element. We will use WebDriver Action Class to perform double click. It is also very important to check the element we have double clicked is performed successfully.
In the below example we have followed the below steps :
Submitted by harrydev on Wed, 12/31/2014 - 04:22
In this example we will see a very simple Page Object Model example. To explain we have taken Google application and created BasePage, Sign In page and Create Account page.
To know what is page object model framework, Please refer Page Object Model Introduction
Steps to Create a Simple Page Object Model. The structure of the sample project should look like in the screen shot below