Wednesday, November 29, 2017

API Testing 01: What is a web service and what is an API?

In the real-world, applications talk (exchange data) with each other over the Internet using http protocol. This data exchange across different applications over the Internet is web service.

Saturday, November 18, 2017

How to get Coordinates, Width, Height and Size of the WebElement using Selenium WebDriver?

Selenium WebDriver provides Point class in org.openqa.selenium package. Using Point class we get the location and coordinates of the given element.

And using getSize() method that is available in the WebElement interface we can get the width and height of the given WebElement.

Five different ways to refresh the browser using Selenium WebDriver.

Below are the 5 different ways to refresh the browser using Selenium WebDriver.

Method 1: Using navigate.refresh()
Most of us know this approach, driver.navigate.refresh() will refreshes the current page.

Method 2: Using navigate.to()
In this approach using "driver.getCurrentUrl()" we will get the current url of the page and send to the navigate.to() method to refresh the page.

Method 3: Using get()
In this approach using "driver.getCurrentUrl()" we will get the current url of the page and send to the get() method to refresh the page.

Monday, November 13, 2017

How to apply Grouping to test cases in TestNG?

Grouping in TestNG is very simple, it is used to execute specific set of test cases at a time. This grouping can be done based on the test cases functionality or module that they belong or the test set they present (smoke or regression) it is completely depends on tester requirement.

A test method can be categorized into one or more groups, groups is the attribute used in the @Test annotation.

@Test(groups ={'Sales'}) // test method belongs to 'Sales' group
@Test(groups = {'Sales','Marketing'}) //test method belongs to 'Sales and Marketing' groups

Wednesday, November 8, 2017

Maven Tutorial 02: How to install Maven on Windows?

The prerequisites for installing the Maven on Windows machine are:
  • Install JDK (1.7 or above)
  • Set JAVA_HOME and PATH system variables

How do you identify broken links in Selenium Automation?

When we are asked to identify the broken links in the application, what we do? Collecting all the links on the page to a list and looping t...