Top 25 Selenium Webdriver Commands

It covers almost all selenium webdriver commands with syntax. This tutorial acts as your guide to all important Selenium Webdriver commands. 1. Browser Commands Browser commands are the basic commands in Selenium. These commands are the starting point of your selenium script. Browser commands are used to launch browser, maximize it, open url and close browser etc.  Syntax of all browser commands: /************************** * Browser Commands * ************************** */ // Set Path of driver executable String driver_executable_path = "./src/com/techlistic/utils/geckodriver.exe" ; System. setProperty ( "webdriver.gecko.driver" , driver_executable_path); // Launch Browser - Creating a Firefox instance WebDriver driver = new FirefoxDriver(); // For Chrome WebDriver driver = new ChromeDriver(); // For Safari WebDriver driver = new SafariDriver(); // For Opera WebDriver driver = new OperaDriver(); // For IE WebDriver dri

What are Variables in Java?

In this post you will learn about Java variables. What is a Java Variable? A variable can be called as a container which holds some value in a java program.  Variable has assigned a data type which defines what type of value variable can hold. Variable has a name which locates to the memory. If you want to use variable in a program, there are two steps associated with it you have to perform: Variable Declaration Variable Initialization i. Variable Declaration While declaring a variable you have to assign data type with variable name. Variable name has to be unique. Example: String employee; ii. Variable Initialization It means assigning a value to the declared variable. Example: employee = "John" Above two steps (declaration and initialization) can also be joined together in one single step. Example: String employee = "John"; Let's explain above example,  ' String ' is data type ' empl

REST API Testing Tutorial - Manual Testing of REST APIs using Postman

Manual API Testing using Postman Reliable API calls are critical to any decoupled application. Whether it a simple configuration change to an entity or updating the Drupal core, both of them can alter the API response and lead to application-breaking changes on the front-end. An API test suite can watch out for these API breaking changes by running a slew of tests against your endpoint. And when you need to create an API test suite, Postman delivers. Why Postman tool? Postman is a simple GUI for sending HTTP requests and viewing responses. It is built upon an extensive set of power tools, which are incredibly easy to use. Postman helps you perform a variety of functions ranging from organizing requests into collection and folders, sharing common values across requests with environment variables, scripting tests with the built-in node.js based runtime, and at last, automating it all using Postman’s very own CLI — Newman. Install native Postman Application Postma

What is TestNG?

TestNG is a testing framework developed in the lines of JUnit and NUnit, however it introduces some new functionalities that make it more powerful and easier to use. It  is designed to cover all categories of tests − unit, functional, end-to-end, integration, etc., and it requires JDK 5 or higher. Automation Testers make use of TestNg to execute our tests. And it also provides some cool features in the form of parameters of annotations. Feature of TestNG: Annotations (@BeforeMethod, @Test, @@AfterMethod etc.) Flexible test configuration Support for data-driven testing (with @DataProvider) Support for annotation parameters DependsOnMethods Priority Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...). Default JDK functions for runtime and logging (no dependencies) What is an Annotation? Annotation in TestNG actually is code snippet which lies just ahead of the method declaration and controls the execution of the method Annotation starts w

Java Modifiers

  Mo difiers are Java keywords that are used to declare features in applications. They affect either the lifetime or the accessibility of a feature. A feature may be a class, a method, or a variable. Modifiers that affect the visibility of a feature are called access modifiers or visibility modifiers. The remaining modifiers do not fall into any clear categorization and may be called storage and lifetime modifiers. Java modifiers are of two types : Access Modifier   Non-Access Modifier Access Control Modifiers Java provides a number of access modifiers to set access levels for classes, variables, methods and constructors.  The four access levels are: Default Public Private Protected Default:  Visible to the package only . No modifiers are needed.  In sample code below, you can see that no access modifier is used with 'class' keyword which makes it default. Now this class is only visible/accessible to the other classes which are present in the same package along with th