Interface BrowserConfig
- All Known Implementing Classes:
ChromeConfig,EdgeConfig,FirefoxConfig
public interface BrowserConfig
-
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.MutableCapabilitiesFetch the default capabilities from the browser.org.openqa.selenium.MutableCapabilitiesdefaultOptions(boolean headless, String downloadFolderPath, String userDataDir, PageLoadStrategy pageLoadStrategy) Retrieve the default options from the browser curated by BotCity.org.openqa.selenium.remote.HttpCommandExecutorexecutor(org.openqa.selenium.WebDriver driver) Get browser executor.Get driver name from the browser.org.openqa.selenium.remote.SessionIdGet the session id.org.openqa.selenium.WebDriverGet driver instance.waitForDownloads(org.openqa.selenium.WebDriver driver) Wait for all downloads to finish.
-
Method Details
-
defaultOptions
org.openqa.selenium.MutableCapabilities defaultOptions(boolean headless, String downloadFolderPath, String userDataDir, PageLoadStrategy pageLoadStrategy) Retrieve the default options from the browser curated by BotCity.- 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.
-
defaultCapabilities
org.openqa.selenium.MutableCapabilities defaultCapabilities()Fetch the default capabilities from the browser.- Returns:
MutableCapabilitieswith the default capabilities defined.
-
waitForDownloads
Wait for all downloads to finish. Important: This method overwrites the current page with the downloads page.- Parameters:
driver- TheWebDriverinstance.- Returns:
- True if all downloads finished, false otherwise.
-
getDriverName
String getDriverName()Get driver name from the browser.- Returns:
- The driver name.
-
getWebDriverDriver
org.openqa.selenium.WebDriver getWebDriverDriver()Get driver instance.- Returns:
WebDriverinstance.
-
executor
org.openqa.selenium.remote.HttpCommandExecutor executor(org.openqa.selenium.WebDriver driver) Get browser executor.- Parameters:
driver- TheWebDriverinstance.- Returns:
HttpCommandExecutorinstance.
-
getSessionId
org.openqa.selenium.remote.SessionId getSessionId()Get the session id.- Returns:
SessionIdinstance.
-