Class FirefoxConfig

java.lang.Object
dev.botcity.framework.web.browsers.FirefoxConfig
All Implemented Interfaces:
BrowserConfig

public class FirefoxConfig extends Object implements BrowserConfig
  • Constructor Details

    • FirefoxConfig

      public FirefoxConfig()
  • Method Details

    • getWebDriverDriver

      public org.openqa.selenium.WebDriver getWebDriverDriver()
      Description copied from interface: BrowserConfig
      Get driver instance.

      Specified by:
      getWebDriverDriver in interface BrowserConfig
      Returns:
      WebDriver instance.
    • defaultOptions

      public org.openqa.selenium.MutableCapabilities defaultOptions(boolean headless, String downloadFolderPath, String userDataDir, PageLoadStrategy pageLoadStrategy)
      Description copied from interface: BrowserConfig
      Retrieve the default options from the browser curated by BotCity.

      Specified by:
      defaultOptions in interface BrowserConfig
      Parameters:
      headless - Whether or not to use the headless mode.
      downloadFolderPath - The default path in which to save files.
      userDataDir - The directory to use as user profile.
      pageLoadStrategy - The page load strategy.
      Returns:
      The Browser options.
    • defaultOptions

      public org.openqa.selenium.MutableCapabilities defaultOptions(boolean headless, String downloadFolderPath, String userDataDir)
    • defaultCapabilities

      public org.openqa.selenium.MutableCapabilities defaultCapabilities()
      Description copied from interface: BrowserConfig
      Fetch the default capabilities from the browser.

      Specified by:
      defaultCapabilities in interface BrowserConfig
      Returns:
      MutableCapabilities with the default capabilities defined.
    • waitForDownloads

      public Object waitForDownloads(org.openqa.selenium.WebDriver driver)
      Description copied from interface: BrowserConfig
      Wait for all downloads to finish. Important: This method overwrites the current page with the downloads page.

      Specified by:
      waitForDownloads in interface BrowserConfig
      Parameters:
      driver - The WebDriver instance.
      Returns:
      True if all downloads finished, false otherwise.
    • getDriverName

      public String getDriverName()
      Description copied from interface: BrowserConfig
      Get driver name from the browser.

      Specified by:
      getDriverName in interface BrowserConfig
      Returns:
      The driver name.
    • executor

      public org.openqa.selenium.remote.HttpCommandExecutor executor(org.openqa.selenium.WebDriver driver)
      Description copied from interface: BrowserConfig
      Get browser executor.

      Specified by:
      executor in interface BrowserConfig
      Parameters:
      driver - The WebDriver instance.
      Returns:
      HttpCommandExecutor instance.
    • getSessionId

      public org.openqa.selenium.remote.SessionId getSessionId()
      Description copied from interface: BrowserConfig
      Get the session id.

      Specified by:
      getSessionId in interface BrowserConfig
      Returns:
      SessionId instance.