Class AppiumDriverFactory

java.lang.Object
com.magenic.jmaqs.appium.AppiumDriverFactory

public class AppiumDriverFactory
extends java.lang.Object
The type Appium driver factory.
  • Method Summary

    Modifier and Type Method Description
    static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> createDriver​(java.util.function.Supplier<io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement>> createFunction)
    Create driver appium driver.
    static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getAndroidDriver​(java.net.URL mobileHub, org.openqa.selenium.remote.DesiredCapabilities options, java.time.Duration timeout)
    Gets android driver.
    static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getDefaultMobileDriver()
    Gets default mobile driver.
    static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getDefaultMobileDriver​(PlatformType deviceType)
    Gets default mobile driver.
    static org.openqa.selenium.remote.DesiredCapabilities getDefaultMobileOptions()
    Gets default mobile options.
    static org.openqa.selenium.remote.DesiredCapabilities getDefaultMobileOptions​(java.util.Map<java.lang.String,​java.lang.Object> capabilities)
    Gets default mobile options.
    static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getIosDriver​(java.net.URL mobileHub, org.openqa.selenium.remote.DesiredCapabilities options, java.time.Duration timeout)
    Gets ios driver.
    static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getWindowsDriver​(java.net.URL mobileHub, org.openqa.selenium.remote.DesiredCapabilities options, java.time.Duration timeout)
    Gets windows driver.
    static org.openqa.selenium.remote.DesiredCapabilities mergeCapabilities​(org.openqa.selenium.remote.DesiredCapabilities capabilities, java.util.Map<java.lang.String,​java.lang.Object> capabilitiesAsObjects)
    Merge capabilities desired capabilities.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getDefaultMobileDriver

      public static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getDefaultMobileDriver()
      Gets default mobile driver.
      Returns:
      the default mobile driver
    • getDefaultMobileDriver

      public static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getDefaultMobileDriver​(PlatformType deviceType)
      Gets default mobile driver.
      Parameters:
      deviceType - the device type
      Returns:
      the default mobile driver
    • getDefaultMobileOptions

      public static org.openqa.selenium.remote.DesiredCapabilities getDefaultMobileOptions()
      Gets default mobile options.
      Returns:
      the default mobile options
    • getDefaultMobileOptions

      public static org.openqa.selenium.remote.DesiredCapabilities getDefaultMobileOptions​(java.util.Map<java.lang.String,​java.lang.Object> capabilities)
      Gets default mobile options.
      Parameters:
      capabilities - the capabilities
      Returns:
      the default mobile options
    • getAndroidDriver

      public static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getAndroidDriver​(java.net.URL mobileHub, org.openqa.selenium.remote.DesiredCapabilities options, java.time.Duration timeout)
      Gets android driver.
      Parameters:
      mobileHub - the mobile hub
      options - the options
      timeout - the timeout
      Returns:
      the android driver
    • getIosDriver

      public static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getIosDriver​(java.net.URL mobileHub, org.openqa.selenium.remote.DesiredCapabilities options, java.time.Duration timeout)
      Gets ios driver.
      Parameters:
      mobileHub - the mobile hub
      options - the options
      timeout - the timeout
      Returns:
      the ios driver
    • getWindowsDriver

      public static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> getWindowsDriver​(java.net.URL mobileHub, org.openqa.selenium.remote.DesiredCapabilities options, java.time.Duration timeout)
      Gets windows driver.
      Parameters:
      mobileHub - the mobile hub
      options - the options
      timeout - the timeout
      Returns:
      the windows driver
    • mergeCapabilities

      public static org.openqa.selenium.remote.DesiredCapabilities mergeCapabilities​(org.openqa.selenium.remote.DesiredCapabilities capabilities, java.util.Map<java.lang.String,​java.lang.Object> capabilitiesAsObjects)
      Merge capabilities desired capabilities.
      Parameters:
      capabilities - original capabilities object
      capabilitiesAsObjects - Map of String, Object
      Returns:
      merged capabilities object
    • createDriver

      public static io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement> createDriver​(java.util.function.Supplier<io.appium.java_client.AppiumDriver<org.openqa.selenium.WebElement>> createFunction)
      Create driver appium driver.
      Parameters:
      createFunction - the create function
      Returns:
      the appium driver