Different methods to locate UI Elements (WebElements) or Object Recognize Methods:

There are different methods to locate UI Elements (WebElements) or to recognize objects which are as follows:
· By ID
· By Tag Name
· By Class Name
· By Link Text
· By Name
· By Partial Link Text

By ID:

This method is most efficient and mostly used to locate the elements. Every element has its unique id.

Let’s take the example for Google, suppose we have to find/locate the search box of goggle. Use firebug option of Mozilla Firefox with which you can easily locate the element in HTML format. Please refer following screenshot:

<td id=”gs_tti0″ class=”gsib_a”>

Id of Search box of goggle is gs_tti0.

Now Example for how to find an element via using ID:

WebElement element = driver.findElement(By.id(“gs_tti0”));

 By Tag Name:

To find tag name of a use fire bug.

Let’s take the example for Google, suppose we have to find/locate the “Google Search” button of goggle via tag name. Use firebug option of Mozilla Firefox with which you can easily locate the element in HTML format. Please refer following screenshot:

<input type=”submit” onclick=”this.checked=1″ name=”btnK” value=”Google Search”/>

Tag Name of Google Search” button of goggle is input here.

Now Example for how to find an element via using TagName:

WebElement element = driver.findElement(By.tagName("input"));

By Class Name:

There may be many elements that are associated with same class name so finding multiple elements becomes the more practical option over finding the first element.

Example of how to find an element that looks like this:

<div class=”tsf-p” style=”position:relative”>

Here tsf-p is classname.

List<WebElement> element = driver.findElements(By.className("tsf-p "))
Remember that use findElements method instead of findElement to find multiple elements.

 By Link Text:

By using By Link Text method of class “By “you can find link element with matching visible text.

Let’s take the example for Google, suppose you want to find/locate the “Advertising Programs” link of goggle via Link Text.

Now Example for how to find an element i.e. link via using linkText:

WebElement element = driver.findElement(By.linkText("Advertising Programs"));

By Name:

By using By Name method of class “By “you can find link element via name attribute of element.

Example of how to find an element that looks like this:

<input type=”submit” onclick=”this.checked=1″ name=”btnK” value=”Google Search”>

Here” btnK” is name.

List<WebElement> element = driver.findElements(By.name("btnK "))

By Partial Link Text:

By using “BypartialLinkText” method of class “By “you can find link element with Partial matching visible text.

Let’s take the example for Google, suppose you want to find/locate the “Advertising Programs” link of goggle via BypartialLinkText. For this you can use:

WebElement element = driver.findElement(By. partialLinkText ("Advertising"));


Xpath is a locator, it is an unique address which identifies each and every element.WebDriver uses a browser’s native XPath capabilities wherever possible. To find xpath of an element use firebug and fire path adons on Mozilla Firefox.

Let’s take the example for Google, suppose we have to find/locate the search box of goggle via using xpath. Use firebug option of Mozilla Firefox with which you can easily locate the element in HTML format and copy the xpath from xpath bar of firepath tab.Please refer following screenshot:

Now Example for how to find an element via using xpath:

WebElement element = driver.findElement(By.xpath("//*[@id='gs_tti0']"));
 Note: Don’t copy the dot from xpath bar.



English: System Life Cycle as taught in the AQ...

Systems Development Life Cycle (SDLC):

The systems development life cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project. o manage this, a number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental etc.

Stages or different phases of SDLC are mentioned below:

  • Project planning, feasibility study
  • Systems analysis, requirements definition
  • Systems design
  • Implementation
  • Integration and testing
  • Acceptance, installation, deployment
  • Maintenance

Project planning, feasibility study: Establishes a high-level view of the intended project and determines its goals.

Systems analysis, requirements definition: Refines project goals into defined functions and operation of the intended application. Analyzes end-user information needs.

Systems design: Describes desired features and operations in detail, including screen layouts, business rules, process diagrams, pseudo code and other documentation.

Implementation: Coding is written by developers in this phase.

Integration and testing: Brings all the pieces together into a special testing environment, then checks for errors, bugs and interoperability.

Acceptance, installation, deployment: The final stage of initial development, where the software is put into production and runs actual business.

Maintenance: What happens during the rest of the software’s life: changes, correction, additions, and moves to a different computing platform and more? This, the least glamorous and perhaps most important step of all, goes on seemingly forever.

Waterfall Model:

The waterfall model is a sequential software development model in which development is seen as flowing steadily downwards (like a waterfall) through several phases.

Waterfall model was meant to function in a systematic way that takes the production of the software from the basic step going downwards towards detailing just like a Waterfall which begins at the top of the cliff and goes downwards but not backwards.

Different Phases of Waterfall Model:

Definition Study / Analysis: During this phase research is being conducted which includes brainstorming about the software, what it is going to be and what purpose is it going to fulfill.

Basic Design: If the first phase gets successfully completed and a well thought out plan for the software development has been laid then the next step involves formulating the basic design of the software on paper.

Technical Design / Detail Design:  After the basic design gets approved, then a more elaborated technical design can be planned. Here the functions of each of the part are decided and the engineering units are placed for example modules, programs etc.

Construction / Implementation: In this phase the source code of the programs is written.Testing: At this phase, the whole design and its construction is put under a test to check its functionality. If there are any errors then they will surface at this point of the process.

Integration: in the phase of Integration, the company puts it in use after the system has been successfully tested.Management and Maintenance: Maintenance and management is needed to ensure that the system will continue to perform as desired.

Advantages of Waterfall Model:

  • Waterfall model is simple to implement and also the amount of resources required for it are minimal.
  • This methodology is preferred in projects where quality is more important as compared to schedule or cost.
  • Documentation is produced at every stage of the software’s development. This makes understanding the product designing procedure, simpler.
  • After every major stage of software coding, testing is done to check the correct running of the code.

 Disadvantages of Waterfall Iterative Model:

  •  Real projects rarely follow the sequential flow and iterations in this model are handled indirectly. These changes can cause confusion as the project proceeds.
  •  In this model we freeze software and hardware. But as technology changes at a rapid pace, such freezing is not advisable especially in long-term projects.
  • Even a small change in any previous stage can cause big problem for subsequent phases as all phases are dependent on each-other.
  • Going back a phase or two can be a costly affair.


Eclipse (software)

Download and Configuring the Selenium Webdriver in Eclipse:


  • JDK
  • Eclipse setup
  • Selenium

Steps to Download and Configuring the Selenium Webdriver in Eclipse:

1. Go to http://seleniumhq.org/download/

2. Click on Download link which is associated with java release. Download the jar files. Refer following screenshot.

3. When you download it you will get a folder. In this folder you have two jar files related to selenium and a lib folder in which you have another jar files. Refer following screenshot.

4. Now Create a New project in Eclipse for this you have to follow the following steps:

  • Go to Eclipse –> Click File –> New –> Project
  • In Select Wizard –> Click Java –> “Java Project” (Refer following screenshot.)
  • Give the project name
  • Click Finish – Click Yes

5. Now add all jars which you have downloaded earlier. Go to properties by right clicking on project.

  • Click “Java Build Path”
  • Click Libraries tab
  • Click “Add External JARs” button
  • Select both selenium jars and all other jars from lib folder of downloaded folder.

If you like this post ,Don’t forget to write comments……………………

Selenium logo

Selenium2/Selenium Webdriver:


Webdriver is a tool for automating testing web applications. Webdriver makes direct calls to the browser using each browser’s native support for automation. Selenium Webdriver does not depends upon the server. We can directly run the programs/scripts in the main method. Selenium Webdriver is very simple, easy to use and to the point.

Features of Selenium Webdriver:

  • Selenium Webdriver supports various languages for example java, Python, C#, Ruby, Perl, Php, Java script.
  • No need to start selenium server.
  • Selenium Webdriver Supports iPhone and Android testing.
  • You can find coordinates of any object using Webdriver.
  • You can easily simulate clicking on front and back button of browser.
  • Keyword driven framework is very easy to build in webdriver.
  • Webdriver uses native automation and does not have the sandbox constraints of Selenium-RC. It’s a little faster and does not require a server.


If you like this post ,Don’t forget to write comments…………………

V-Model for Testing:

V-Model evolved from waterfall Model.  Each phase must be completed before the next phase begins.  Instead of moving down in a linear way, the process steps are bent upwards after the coding phase, to form the typical V shape. Testing is emphasized in this model more than in the waterfall model.  It is a structured approach to testing. It brings high quality into the development of our products. The V-model is also called as Verification and Validation model.

Typical V-model shows Software Development activities on the Left hand side of model and the Right hand side of the model actual Testing Phases can be performed.

There are variants of V-Model however we will take a common type of V-model example. The V-model generally has four test levels.

1. Unit Testing:

  • The most ‘micro’ scale of Testing.
  • Performed by Programmer.
  • Requires detailed knowledge of the internal program design and code.
  • Ensures the component is working according to the detailed design/build specifications of the module.
  • Also known as component, module, or program testing.

2.Integration Testing:

  • Testing of more than one (tested) unit together to determine if they function correctly.
  • Focus on interfaces
  • It is done using the integration test design prepared during the architecture design phase.
  • Done by developers/designers and testers in collaboration
  • Also called Interface Testing or Assembly Testing

3. System Testing:

  •  After the software has been integrated (constructed), sets of high order tests shall be conducted.
  • System testing verifies that all elements mesh properly and the overall system function/performance is achieved.
  • The purpose of system testing is to fully exercise the computer-based system. The aim is to verify that all system elements and validate conformance against SRS.

  4.  Acceptance Testing:

  •  To determine whether a system satisfies its acceptance criteria and business requirements or not.
  • Done by real business users.
  • It enables the customer to determine whether to accept the system or not.
  • Acceptance Testing also called as Beta Testing, Application Testing or End User Testing.
  • Acceptance Testing should be performed in real operating environment.
  • Customer should be able to perform any test based on their business processes.

Benefits of V-Model:

  • Faults are prevented and it stops fault multiplication.
  •  Avoids the downward flow of defect.
  •  Lower defect Resolution cost due to earlier detection.
  •  Improved quality and reliability.
  •  Reduction in the amount of Re-work.
  •  Improved Risk Management
  •  Validation and Verification at each level of stage containment
  •  Allows testers to be active in the project early in the project’s lifecycle. They develop critical knowledge about the system.


If you like this post ,Don’t forget to write comments…………………

Selenium logo

Selenium 2 Introduction:

Selenium 2:

Selenium is a Web testing tool. Selenium is a robust set of tools that is used to record and run web applications. There are three components of Selenium. i.e. Selenium is composed of three major tools which has their own specific roles. Selenium is free and open source.

Selenium 2 provides drivers for:

  • Mozilla Firefox
  • Google Chrome
  • Microsoft Internet Explorer
  • Opera
  • Apple iPhone
  • Android browsers


Selenium-IDE is the Integrated Development Environment for building Selenium test cases. It operates as a Firefox add-on.

Advantages of Selenium-IDE:

It is very easy to use. It has record and play feature and we can also write our own extensions and implement loops, if statements, use arrays, parameterize test cases. Selenium-IDE is very user friendly.

Limitation of Selenium-IDE:

It gets installed as an add-on on Mozilla and works only on Mozilla. IDE cannot work on browsers other than Mozilla. That’s why RC or webdriver is used.

Selenium-RC (Remote Control):

Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language.

Advantages of Selenium-RC:

Selenium Remote Control is great for testing complex AJAX-based web applications. Selenium Remote Control can be used for any java script enabled browser.

Limitation of Selenium-RC:

In RC we have to start the server again and again i.e. RC completely depends upon server. Switching between the multiple instances of the same browser is not possible. Switching between the multiple instances of the different browsers is not possible.


Selenium Grid is a server that allows tests to use web browser instances running on remote machines. With Selenium Grid, one server acts as the hub.