Submitted by harrydev on Sun, 12/07/2014 - 11:39
Working with checkbox is very simple using webdriver. It is same as click operation. But it is always recommended to check if that is already in selected mode or deselected. Because, if it is already selected and when you click on the same element it will get deselected. We will look into different ways to perform select and de-select operations on checkboxes. We will also use reusable methods to perform the operation in multiple tests.
The below is the simple command to do that:
Submitted by harrydev on Sun, 11/02/2014 - 12:39
In testing, it is always important to test application in different browsers. We can perform automation on multiple browsers using selenium and testng. If there are more number of tests that need to be executed in parallel on different browsers also, we can do this using testng. And there is an other challenging task such executing tests in different browser versions and also different Operating systems. This can be achieved with Selenium Grid.
Submitted by harrydev on Fri, 10/03/2014 - 05:21
As we know it is always better to use ID and Name to locate the elements which will work for sure. You don't need to search for any other locator if there is ID or Name present in your application.
Let us look for xpath examples to use ID and Name effectively with combinations
If the html looks like below :
<input type="text" aria-label="Email or Phone" value="Email or Phone" tabindex="1" placeholder="" name="email" id="email"
class="inputtext _5aju" style="background-color: transparent;">
We can use as below :
Submitted by harrydev on Mon, 09/22/2014 - 12:49
To install AutoIt first download the AutoIt exe file from the below location.
Click here to Download AutoIt exe file
About AutoIT : AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. Please refer AutoIt for more details
Click on download at AutoIt Full Installation
Submitted by harrydev on Sat, 09/20/2014 - 05:58
In this framework, keywords are developed which are equal to a unit level functionality. It is an independent framework which perform automation based on the keywords specified in the excel sheet. Based on the type of application, the number of keywords will be increased to handle different functionalities.
The below are the few keywords which are used commonly in the web applications.
Submitted by harrydev on Mon, 09/08/2014 - 13:46
1. We may require to scroll to bottom of the page and then perform operations. For this scenario we have created a test 'scrollingToBottomofAPage'/
Submitted by harrydev on Mon, 09/08/2014 - 13:03
In Selenium .properties files are mainly used to store GUI locators / elements, and also Global fields like database configuration details
'.properties' files are mainly used in Java programs to maintain project configuration data, database config or project settings etc. Each parameter in properties file are stored as a pair of strings, in key and value format, where each key is on one line. You can easily read properties from some file using object of type Properties.
Below is a example program which demonstrate to read the data from .properties file using Java.
Submitted by harrydev on Sat, 09/06/2014 - 13:17
The Easy way of uploading a file is simple case of just finding the element and typing the absolute path of the document into it.
It is mandatory that it works only when the textbox is enabled. So please make sure that the input element is visible.
Sample HTML Code should look similar to this :
Submitted by harrydev on Sat, 09/06/2014 - 11:27
With the help of AutoIt tool (open source tool) we can upload by transferring the control from Selenium webdriver to AutoIt.
We need to explicitly call the AutoIt script from our program.
About AutoIT : AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting.
We need to call the AutoIt script after clicking on the upload button. Immediately after clicking on Upload button, the control should be transferred to AutoIt by the below statement which takes care of uploading the file.
Submitted by harrydev on Sat, 09/06/2014 - 11:11
There are different ways to handle file uploads with Selenium Webdriver.
The First and the Easy way is simple case of just finding the element and typing the absolute path of the document into it.
HTML code should look similar to this :
<input type="file" name="datafile">