Class EdgeConfig
java.lang.Object
dev.botcity.framework.web.browsers.EdgeConfig
- All Implemented Interfaces:
BrowserConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.MutableCapabilitiesFetch the default capabilities from the browser.org.openqa.selenium.MutableCapabilitiesdefaultOptions(boolean headless, String downloadFolderPath, String userDataDir) 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.
-
Constructor Details
-
EdgeConfig
public EdgeConfig()
-
-
Method Details
-
getWebDriverDriver
public org.openqa.selenium.WebDriver getWebDriverDriver()Description copied from interface:BrowserConfigGet driver instance.- Specified by:
getWebDriverDriverin interfaceBrowserConfig- Returns:
WebDriverinstance.
-
defaultOptions
public org.openqa.selenium.MutableCapabilities defaultOptions(boolean headless, String downloadFolderPath, String userDataDir, PageLoadStrategy pageLoadStrategy) Description copied from interface:BrowserConfigRetrieve the default options from the browser curated by BotCity.- Specified by:
defaultOptionsin interfaceBrowserConfig- 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
-
defaultCapabilities
public org.openqa.selenium.MutableCapabilities defaultCapabilities()Description copied from interface:BrowserConfigFetch the default capabilities from the browser.- Specified by:
defaultCapabilitiesin interfaceBrowserConfig- Returns:
MutableCapabilitieswith the default capabilities defined.
-
waitForDownloads
Description copied from interface:BrowserConfigWait for all downloads to finish. Important: This method overwrites the current page with the downloads page.- Specified by:
waitForDownloadsin interfaceBrowserConfig- Parameters:
driver- TheWebDriverinstance.- Returns:
- True if all downloads finished, false otherwise.
-
getDriverName
Description copied from interface:BrowserConfigGet driver name from the browser.- Specified by:
getDriverNamein interfaceBrowserConfig- Returns:
- The driver name.
-
executor
public org.openqa.selenium.remote.HttpCommandExecutor executor(org.openqa.selenium.WebDriver driver) Description copied from interface:BrowserConfigGet browser executor.- Specified by:
executorin interfaceBrowserConfig- Parameters:
driver- TheWebDriverinstance.- Returns:
HttpCommandExecutorinstance.
-
getSessionId
public org.openqa.selenium.remote.SessionId getSessionId()Description copied from interface:BrowserConfigGet the session id.- Specified by:
getSessionIdin interfaceBrowserConfig- Returns:
SessionIdinstance.
-