working with custom exceptions

  • 26
    Jun

    working with custom exceptions

    sample code to implement your custom exceptions and use them in your programs Custom exceptions declaration: ========================================= package CustomExceptions; class MyException extends Exception { public MyException(String s) { super(s);...

    Read More
  • 09
    Jan

    Initializing iOS or Android drivers

    public static Appiumdriver driver; AppiumServiceBuilder serviceBuilder = new AppiumServiceBuilder().usingAnyFreePort(); service=AppiumDriverLocalService.buildService(serviceBuilder); service.start(); driver = (isTargetAndroid()) ? getAndroidDriver(service.getUrl(), false, false) : getIOSDriver(service.getUrl(), false, false); where isTargetAndroid() is a private method in...

    Read More
  • 09
    Jan

    Selenium drivers for Mobile automation

    RemoteWebDriver: This driver class comes directly from the upstream Selenium project. This is a pretty generic driver where initializing the driver means making network requests to a Selenium hub...

    Read More
  • 08
    Jan

    Screen orientation in Mobile browsers

    //Changing screen Orientation to LANDSCAPE. driver.rotate(org.openqa.selenium.ScreenOrientation.LANDSCAPE); //Changing screen Orientation to PORTRAIT. driver.rotate(org.openqa.selenium.ScreenOrientation.PORTRAIT);   reference

    Read More
  • 08
    Jan

    Handle non-trusted connection in Selenium WebDriver

    A trusted SSL certificate helps to validate the authenticity of the website. In case it doesn’t, you will get an error message from your browser for “non-trusted connection”.  An Untrusted...

    Read More
  • 01
    Jan

    Create Extent Reports with Selenium:

    Pre-requisites Installations to Generate Extent Reports: Following softwares needs to be configured / installed on local system: 1. JDK 2. TestNG 3. Extent Report Jars Download here 4. extent-config.xml...

    Read More
  • 01
    Jan

    Logical flow for Automating POM, PageFactory framework in selenium

    In order to implement POM in we can adopt following project structure: Common function Init — which takes care of Browser launch Page objects — This defines the Page...

    Read More
  • 01
    Jan

    POM, PageFactory Automation framework in selenium

    WebDriver supports POM (Page Object Model) via PageFactory class.  In order to use PageFactory, all the elements needs to be declared on a PageObject as “WebElement” or “List<WebElement>” as...

    Read More
  • 01
    Jan

    Waits in Selenium – Implicit, Explicit, Fluent wait & Thread.sleep

    Explicit wait in selenium: Forcing an exact time of wait (Explicit wait) for specific time can be achieved with:   WebDriverWait wait; wait = new WebDriverWait(driver, 30); wait.until(ExpectedConditions.visibilityOf(lnkCardMenu)); This...

    Read More
  • 30
    Dec

    Capture request response statistics for site performance

    browsermob-proxy is a HTTPArchive tool which allows to capture site statistics while performing Performance / automated tests from a client.  It acts as an interface which collects HTTP Matrices....

    Read More