How to convert an Array as Map in java

  • 21
    Aug

    How to convert an Array as Map in java

    Following code snippet can be used to convert an Array to Map in java import org.apache.commons.lang3.ArrayUtils; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class ArraysToMap { public static void...

    Read More
  • 20
    Aug

    how to handle Untrusted sites in Selenium webdriver

    // Create DesiredCapabilities class object DesiredCapabilities cap=DesiredCapabilities.chrome(); // Set ACCEPT_SSL_CERTS variable to true cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); // Set the driver path System.setProperty(“webdriver.chrome.driver”,”Chrome driver path”); // Open browser with capability WebDriver...

    Read More
  • 20
    Aug

    Advantage of TestAutomation framework

    The advantage of Test Automation framework => Reusability of code => Maximum coverage => Recovery scenario => Low-cost maintenance => Minimal manual intervention => Easy Reporting Below are the...

    Read More
  • 20
    Aug

    How can we handle web-based pop up?

    WebDriver supports following methods to handle pop-ups void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop-up window appears. void accept() – The...

    Read More
  • 20
    Aug

    How to check if an element in displayed / enable / selected on the screen?

    WebDriver supports following methods to check the visibility of the web elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels etc. isDisplayed() ==> check the...

    Read More
  • 16
    Aug

    Invoke a task every 1 minute

    In order to invoke a task / function periodically (say every one minute) we can use following code snippet. Step 1: Create a class which calls “function” to be...

    Read More
  • 15
    Aug

    Compare maps in java

    Following code snippet can be used to compare two Maps package map; import java.util.HashMap; import java.util.Map; public class ComparingMaps { public static void main(String args) { Map map1 =...

    Read More
  • 06
    Aug

    Execute your Selenium script from Jenkins

    There are multiple ways to integrate Selenium with Jenkins. In these step, I will use “Windows batch” file to execute. Step 1: create a Selenium script eg. @Test //TestNG...

    Read More
  • 05
    Aug

    Installing Jenkins on windows OS

    Pre-requisites: #1. Install JDK on your system JAVA_HOME: set it to “JDK Installation location” PATH: update it to “bin” folder path of JDK Installation #2. Download latest war file...

    Read More
  • 30
    Jul

    Defining generic fluent wait for your scripts automation

    Following code snippet can be used to define generics to implement “Fluent waits” for your automation frameworks: Step 1: /** * Use this in case of Stale Error @param...

    Read More