Java Operators

Java Operators are symbols that perform operations on variables and values. Java provides many types of operators which can be used according to our usage. They are classified into following types: Arithmetic Operators Assignment Operators Relational Operators Logical Operators Unary Operators Bitwise Operators  Arithmetic Operators Arithmetic operators are used to perform mathematic operations on variables and data. They operate on numeric values. In simple words they  can be used to perform the mathematical operations of addition, subtraction, multiplication, and division. Operator Description + Performs addition – Performs subtraction * Performs multiplication / Performs division % Returns the remainder of the division Sample Code: class Arithmetic { public static void main (String[] args) { // variables int a = 10 , b = 5 ; // Print sum using addition operator System. out . println ( "a + b = " + (a + b)); // Print difference of a and

10 Best Demo Websites for Automation Testing Practice

This post is specially designed for those folks who want to learn or currently learning Selenium. In this post, I cherry picked links of some of the top demo websites/pages which you guys can use for practice purpose. On the top of it, I also designed Practice Assignments which you can practice on the the shared demo website links.  1.  AUTOMATION PRACTICE FORM Level - Beginner About - This form contains all the important form elements which we come across daily like text box, radio button, check box, select drop downs, multi-select box, button, links, File Upload, Download link. Practice Assignments -  Automate Browser Actions on using Selenium Webdriver Automate Practice Form using Selenium Webdriver 2.  AUTOMATION PRACTICE TABLE Level  - Intermediate About -  This  web page contains table data. You can test your Selenium and Java skills. It would require Selenium commands and java loops, conditions to read table data. Practice

Learn Java by Starting from First Program - Hello World

It's always exciting to write your first program and execute it without error. In this post you will learn to write your first java program. Pre-Requisite Softwares : 1. Java SE Development Kit or JDK  - It is generally a Java Software which you need to install on your system before writing any code in Java. And after installing java set Java Path in your environment variables. Download Latest Java Version from following link - Java Download 2. Java IDE or Text Editor - You need to have any text editor to write Java code. You can use anyone from following Netbeans, Intellij, Eclipse, Notepad or Notepad++ etc. Creating Hello World Program Declare a class ' MyFirstProgram ' Declare the main method public static void main() And print a string "Hello World" using System.out.println() Hello World Program // Class class MyFirstProgram { // Main method public static void main (String[] args) { // Print Hello World System.

How to Install Eclipse Testng Plugin

Install TestNG in Eclipse: Open Eclipse. Click on the 'Help' menu option. Click on "Eclipse Marketplace" You need to install TestNG plugin in your Eclipse to work with it. Below are the steps: 4. Type Testng in Find text box and click on search icon. After TestNG is appeared in the search click on the Install button. 5. After clicking Install, it will show some other dialogues, just click accept the terms and click Finish. 6. Installation will take some time to complete. 7. Eclipse will ask you for restart, click yes. 8. After restart, you can verify if TestNG is installed correctly or not. Click Window -> Preferences , TestNG should display in Preferences list. That's it, you are done with the installation.  Happy Learning! Overview of TestNG  << Previous     ||      Next >>    TestNG Annoations

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