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. The applications may be developed in different technologies like Java, .Net, PHP, Python and etc. Even though the applications are developed in different technologies there should be a common messaging system like XML or JSON for data exchange.

This data exchange across different applications over the Internet is called web service. In a web service, service will be offered by an electronic device to another electronic device for communicating with each other via World Wide Web (Internet).

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
In this approach using "driver.getCurrentUrl()" we will get the current url of the page and send to the 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

Java Program 6: How to reverse a String in Java?

In this post we will discuss different methods to reverse a String in java programming. Method 1: Step 1: Read the input string using ...