Posts

Showing posts from September, 2018

QA's approach 2 Java - Map Interface with Examples

Map Interface Used for storing key value pairs Linked HashMap: Will retain the Entries in the insertion order.  HashMap: Will not retain the Entries in the insertion order.  Methods in Map Interface: public Object put(Object key, Object value):  This method is used to insert an entry in this map. public void putAll(Map map):  This method is used to insert the specified map in this map. public Object remove(Object key):  This method is used to delete an entry for the specified key. public Object get(Object key): This method is used to return the value for the specified key. public boolean containsKey(Object key):  This method is used to search the specified key from this map. public Set keySet():  This method is used to return the Set view containing all the keys. public Set entrySet():  The entrySet( ) method declared by the Map interface returns a Set containing the map entries.  Each ...

Selenium 4 absolute beginners - Maven POM file explanation with Sample POM file

Sample POM 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>com.Company.ProductNameAutomation</groupId>        <artifactId>ProductNameAutomation</artifactId>        <version>0.0.1-SNAPSHOT</version>        <properties>               <jre.level>1.8</jre.level>               <jdk.level>1.8</jdk.level>        </properties>        <dependencies>             ...

Selenium 4 absolute beginners - How to create Batch execution file

Sample Batch Execution file @echo off :: Delete the existing log file ERASE C:\Softwares\Workspace\ProductNameAutomation\build.log :: Create a new Empty log file  echo.>C:\Softwares\Workspace\ProductNameAutomation\build.log :: Setting project Home Path SET PROJECT_HOME=C:\Softwares\Workspace\ProductNameAutomation cd %PROJECT_HOME% echo CURRENTLY WORKING ON DIRECTORY %PROJECT_HOME% PATH echo Setting configurations SET M2_HOME=C:\Softwares\Workspace\apache-maven-3.5.4 SET M2=%M2_Home%\bin SET path=%M2_Home%\bin ::SET Java_Home="C:\Program Files (x86)\Java\jdk1.8.0_181" ::Start the test case echo test execution in progress call mvn -f C:\Softwares\Workspace\ProductNameAutomation\pom.xml clean install compile test -X -l C:\Softwares\Workspace\ProductNameAutomation\build.log echo test execution in completed :: Generating report based on above ran test cases echo Report generation is in progress call mvn surefire-report:rep...

Automation 4 absolute Beginners - Selenium Test Setup integration with Maven & TestNG

Click on the link to have apractical view of the dicussion

Automation 4 absolute beginners - JQuery Selectors

JQuery-Selectors: A JQuery selector is a function which makes use of expressions to find out matching elements from a DOM based on the given criteria. How to use selectors: The selectors are very usefull and would be required at every step while using JQuery. They get the exact element that you want from your HTML document. JQuery Selectors: Selector Example Selects * $("*") All elements #id $("#lastname") The element with id=lastname .class $(".intro") All elements with class="intro"  Element $("p") All p elements .class, .class $(".intro, .demo")        All elements with the classes "intro" and "demo" :first $("p:first") The first p element :last $("p:last") The last p element :even $("tr:even") All even tr elements :odd              $("tr:odd")         ...

Selenium - JavaScript Executor

Image
Practical usage of javaScriptexecutor Selenium Webdriver works similar way to an user does actions on the browser web pages, hence when user is not able to interact with an element on web page, even the webdriver will not be able to do so. But using javascript, we will be to interact with that webelement.  So this doesn't provide us an accurate result, thus even a failed case may be passed due to this. To avoid this, prior to trying with JavascriptExecutor, we must try to execute our selenium code with different browser, if it behaves differently with other browsers then only we should go for the JavascriptExecutor, but if the test is failing in all browser then we should fail the testcase. What is Javascript A Javascript is a small chunks of program that makes a website interactive. For example, a javascript could create a pop-up alert box , or provide a dynamic dropdown menu. JavaScript code can listen to even on the web page like reacting to a click on a button,...

Basic HTML insights for QA's

Basic understanding of HTML Whats the purpose of Tags & Attributes? Tags of HTML tell the browser what to present, its attributes tells how to present that. Attributes helps in improving the appearance of a web page Commonly used Tags & their purpose HTML form is a container and it can contain one or more buttons, text boxes and other form elements. Input tag We use input tag to create form elements like radio, button, submit etc Option tag The <option> tag is used to define the options in the drop down list. Frameset tag It is used for creating frames. A <frameset> element holds one or more <frame> elements. When we are creating frames we are actually working with multiple html documents. List tags Order list -> ol Unorder list -> ul li Tag: The content of the list is created using <li> tag Div Tag Div stands for division because it divides the content into individual sections. It is used as a container to group bloc...