Posts

Showing posts from August, 2018

Automation 4 absolute beginners - Selenium WebDriver_Locators

WebElement Location Statergies: To get know the basic usage of HTML tags - Click Here All the elements on the web page are called WebElements in selenium webdriver. To identify the elements on the Web page uniquely, Selenium has provided support with the following locators 1. ID 2. ClassName 3. TagName 4. Name 5. LinkText 6. Partial LinkText 7. CSS Selector 8. XPath 1. ID ID may be generated dynamically, at that instant of time,this might fail driver.findElement(By.ID("IDValue")); 2. ClassName Multiple classes may have same ClassName, such as Radio buttons, Check boxes. So it might not be possible to identify an individual element uniquely. But when required to identify a group of elements, it will be useful driver.findElement(By.ClassName("Value")); 3. TagName Multiple Elements may have the same TagName, So it might not be possible to identify an individual element uniquely. But when required to identify a group of elements, it will be u...

Element Identification Techniques - XPath and CSS for absolute begginers

Element Location Strategies using XPath, CSS & DOM Automating any application requires identification of the element & interact with it Locator are used for identifying the elements on the web page uniquely. There are so many ways to identify the elements in Selenium and those are called locators. Some of the most used and popular locators are XPath & CSS What is XPath? How do we use XPath in Elements identification? XPath (XML Path Language),  is a query language for selecting nodes from an XML document. The XPath language is based on a tree representation of the XML document, and provides the ability to navigate around the tree, selecting nodes by a variety of criteria. XML contain one or more elements/tags/nodes An element may contain content/data or may contain other elements as child nodes. Each element should have starting tag and ending tag. The element content will reside in between these two tags. Apart from the content each tag  may have ...

QA's approach 2 Selenium Web Driver - Web Driver API Architecture

Image
Selenium Web Driver API Architecture: Webdriver doesn't help us running the Test cases nor doesn't it help us in reports generation/batch running/ordering the test case execution/excel file reading but it just helps us to interact with the browser using the webdriver commands “WebDriver”: Is an interface comes under this package of Selenium and a sub interface of “SearchContext”. “SearchContext” consists of “WebDriver” & “WebElement” as a sub interfaces. What is “GeckoDriver”: It is a WebDriver which is used to interact with WebApps. So, this means that all the drivers should have all the implementations which are contracted in the WebDriver interfaces and all the Drivers can be called as WebDriver. Web Page composed of Web Elements and these Drivers’s will communicate with the Web Page. For communicating with Web Page means communication with Elements present on the Web Page like for example: “Textboxes”, Buttons”, “Links” etc. “WebElement” a sub interface ...

QA's approach to CI - CI using Jenkins_ANT/MAVEN_TestNG

About Jenkins Branched from Hudson —Java based Continuous Build System Runs in servlet container Glassfish, Tomcat Supported by over 400 plugins SCM, Testing, Notifications, Reporting, Artifact Saving, Triggers, External Integration What can Jenkins do? Generate test reports —Integrate with many different Version Control Systems Push to various artifact repositories Deploys directly to production or test environments Notify stakeholders of build status java -jar WAR jenkins.war httpport=9090

QA's approach 2 Java - Working with Version Control

How to work with version control from Eclipse: 1. Once the Maven project is created - follow the steps from 2 To know about Step 1 click here 2. Now check in the project to Version control Launch Eclipse-> Select the project created in Step 1 ->Right click on the project ->Team->Share Project ->select SVN/GitHub 3. Once the connection was established & project was shared, if we make any changes then we need to commit the changes     Team-> commit 4. To download changes done by others to our local, we need to get the updated one, so      Team -> Update

Technologies - TestNG Framework - What & Why?

What is TestNG Its a New Generation Unit Testing framework, that is influenced by both JUnit and NUnit, but has more powerful features and is easier to use. It is designed with a good set of capabilities that simplify testing requirements ranging from functional, regression, end-to-end, and more Why testNG: 1. Support for annotations - Annotations in TestNG are lines of code that can control how the method below them will be executed. Annotations can use parameters just like the usual Java methods. 2. Support for parameterization - Static data using @Parameters 3. Support for Data Driven Testing using Data providers - Dynamic data   4. Enables user to set execution priorities & groups the test methods 5. Readily supports integration with various tools and plug-ins like build tools (Ant, Maven etc.), 6. Facilitates user with effective means of Report Generation using ReportNG.  WebDriver has no native mechanism for generating reports , So TestNG c...

QA's approach 2 Java - Build Tools - ANT

Image
Build Tools ANT abbreviates as Another Neat Tool Basically its a build management tool, which is used for Compiling the Code, Creating the Project Tree structure, etc based on the targets defined in Build.xml file Will only allow us to execute the framework from command prompt Ant uses an xml file for its configuration. The default file name is build.xml. Ant builds are based on three blocks: tasks, targets and extension points. How to declare variables in Build.xml file =============================== property element Ant uses the property element which allows us to specify properties. This allows the properties to be changed from one build to another, or from one environment to another. <?xml version="1.0"?> <project name="Test Project" default="notify"> <property name="Blogname" value="novice-2-professional.blogspot.com"/> <target name="notify"> <echo>Version ...

QA's approach 2 Java - Build Tools - Maven

Image
Build Management Tools  Maven Its a Build & Dependency management tool Maven POM is an acronym for Project Object Model. The pom.xml file contains information of project and configuration information for the maven to build the project such as dependencies, build directory, source directory, test source directory, plugin, goals etc. Maven reads the pom.xml file, then executes the goal. POM.xml This file will contain all the instruction which we wanted to do Maven reads instructions from POM.xml file  1. Verifies the resources 2. Compiles the tests 3. Package the test to jar file ======================================================================== <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId...