Uncategorized

  • Home
  • /
  • Uncategorized
  • )
  • 24
    Apr

    Extending class in JavaScript

    Following code snippet demonstrates class extension in JavaScript —————————————————————– ES2015 Classes In the ES2015 specification, you can use the class syntax which is just sugar over the prototype system....

    Read More
  • 22
    Apr

    Sample JMeter testplan to update JIRA status

    JIRA_Testplan This test plan demonstrates following capabilities, that can be executed against a valid JIRA Instance: 01. Basic Authentication with JIRA 02. Get all projects in JIRA Instance 03....

    Read More
  • 29
    Mar

    Perfecto community code snippets

    https://github.com/PerfectoCode/Community-Samples https://github.com/PerfectoMobileSA Java Selenium course (@ Perfecto GitRepository): https://github.com/PerfectoMobileSA/JavaSeleniumCourseAssignments/blob/master/src/main/java/Assignment01_Wikipedia.java

    Read More
  • 25
    Feb

    Execute Jenkins from command prompt

    Start Jenkins from command line using java -jar C:\Program Files (x86)\Jenkins\jenkins.war

    Read More
  • 01
    Feb

    Read a csv file as map of map

    public static Map< String, Map<String, String>> getData(String fileName) { Map < String, Map< String, String>> fileData = new HashMap<>(); int rowCount = 0; String csvRowData = null; try (BufferedReader...

    Read More
  • 05
    Sep

    Maven dependency for Javamail

    javax.mail mail 1.4 javax.activation activation 1.1.1 Once you have pom updated for above dependencies, you can use following code to send email from your java program

    Read More
  • 04
    Sep

    re-run failed test case with Selenium TestNG framework

    In order to re-run failed test cases, TestNG provides “IRetryAnalyzer” interface, which needs to be implemented for “retry()” Following code snippet demonstrates how to implement this interface and re-run...

    Read More
  • 30
    Aug

    Capture logs for timestamp for each action performed with WebDriver (selenium)

    Step 1: Create a class implementing “WebDriverEventListener” e.g. import java.sql.Date; import java.sql.Timestamp; import java.time.LocalDate; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.events.WebDriverEventListener; public class EventHandler implements WebDriverEventListener { //private...

    Read More
  • 30
    Aug

    Implementing WebDriverEventListener to highligh the field under test with Selenium webdriver

    Following code can be used to highlight an element using javascript import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.Test; public class HighlighterClass { @Test public...

    Read More
  • 21
    Aug

    How to configure your log4j.properties file in Eclipse

    Step 1: Create a log4j.properties file (eg.) # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE #log4j.rootCategory=INFO, CONSOLE, LOGFILE # Set the enterprise...

    Read More