Class WebDriverManager
- java.lang.Object
-
- eu.tsystems.mms.tic.testframework.webdrivermanager.WebDriverManager
-
@Deprecated public final class WebDriverManager extends java.lang.ObjectDeprecated.Provides threadsafe WebDriver and Selenium objects. These objects are needed for correct logging and reporting.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_SESSION_KEYDeprecated.UseWebDriverRequest.DEFAULT_SESSION_KEYinstead
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static WebDriverManagerConfigconfig()Deprecated.UsegetConfig()insteadstatic voidforceShutdown()Deprecated.UseIWebDriverManager.shutdownAllThreadSessions()insteadstatic voidforceShutdownAllThreads()Deprecated.static WebDriverManagerConfiggetConfig()Deprecated.UsegetWebDriver(WebDriverRequest)insteadstatic java.util.Map<java.lang.String,java.lang.Object>getGlobalExtraCapabilities()Deprecated.Configure capabilities on yourWebDriverRequeststatic java.lang.StringgetSessionKeyFrom(org.openqa.selenium.WebDriver driver)Deprecated.static java.util.Optional<java.util.Locale>getSessionLocale(org.openqa.selenium.WebDriver webDriver)Deprecated.Returns the session localestatic org.openqa.selenium.WebDrivergetWebDriver()Deprecated.Getter for webDriver instance.static org.openqa.selenium.support.events.EventFiringWebDrivergetWebDriver(eu.tsystems.mms.tic.testframework.webdrivermanager.WebDriverRequest webDriverRequest)Deprecated.static org.openqa.selenium.support.events.EventFiringWebDrivergetWebDriver(java.lang.String sessionKey)Deprecated.Getter for webDriver instance.static java.util.stream.Stream<org.openqa.selenium.support.events.EventFiringWebDriver>getWebDriversFromThread(long threadId)Deprecated.static booleanhasAnySessionActive()Deprecated.Returns true if any session is active.static booleanhasSessionsActiveInThisThread()Deprecated.static voidintroduceWebDriver(java.lang.String sessionKey, org.openqa.selenium.WebDriver driver)Deprecated.Introduce an own webdriver object.static voidintroduceWebDriver(org.openqa.selenium.WebDriver driver)Deprecated.Introduce an own webdriver object.static booleanisJavaScriptActivated(org.openqa.selenium.WebDriver driver)Deprecated.Returns a boolean status of the javascript activation in the browser.protected static java.lang.BooleanisWebDriverActive()Deprecated.checks if web driver is activestatic java.lang.StringmakeSessionExclusive(org.openqa.selenium.WebDriver driver)Deprecated.Make the session exclusive.static voidregisterWebDriverFactory(WebDriverFactory webDriverFactory, java.lang.String... browsers)Deprecated.static voidremoveGlobalExtraCapability(java.lang.String key)Deprecated.Remove extra capability from capabilities.static voidsetGlobalExtraCapabilities(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)Deprecated.Configure capabilities on yourWebDriverRequeststatic voidsetGlobalExtraCapability(java.lang.String key, java.lang.Object value)Deprecated.Configure capabilities on yourWebDriverRequeststatic booleansetSessionLocale(org.openqa.selenium.WebDriver webDriver, java.util.Locale locale)Deprecated.Sets the locale for a specified sessionstatic voidsetUserAgentConfig(java.lang.String browser, UserAgentConfig configurator)Deprecated.static voidshutdown()Deprecated.UseIWebDriverManager.shutdownAllThreadSessions()insteadstatic voidshutdownExclusiveSession(java.lang.String key)Deprecated.
-
-
-
Field Detail
-
DEFAULT_SESSION_KEY
public static final java.lang.String DEFAULT_SESSION_KEY
Deprecated.UseWebDriverRequest.DEFAULT_SESSION_KEYinstead- See Also:
- Constant Field Values
-
-
Method Detail
-
setGlobalExtraCapability
public static void setGlobalExtraCapability(java.lang.String key, java.lang.Object value)Deprecated.Configure capabilities on yourWebDriverRequestAdds extra capability to desired capabilities.- Parameters:
key- The key of the capability to set.value- The value of the capability to set.
-
setGlobalExtraCapabilities
@Deprecated public static void setGlobalExtraCapabilities(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)
Deprecated.Configure capabilities on yourWebDriverRequestAdds extra capabilities to desired capabilities.- Parameters:
desiredCapabilities- .
-
getGlobalExtraCapabilities
public static java.util.Map<java.lang.String,java.lang.Object> getGlobalExtraCapabilities()
Deprecated.Configure capabilities on yourWebDriverRequestGet all set extra capabilities (not the DesiredCapabilities that are set automatically- Returns:
-
removeGlobalExtraCapability
public static void removeGlobalExtraCapability(java.lang.String key)
Deprecated.Remove extra capability from capabilities.- Parameters:
key- The key of the capability to remove.
-
getWebDriver
public static org.openqa.selenium.WebDriver getWebDriver()
Deprecated.Getter for webDriver instance.- Returns:
- instance of WebDriver object.
-
getWebDriver
public static org.openqa.selenium.support.events.EventFiringWebDriver getWebDriver(java.lang.String sessionKey)
Deprecated.Getter for webDriver instance.- Parameters:
sessionKey- The storedSessionId to get the webDriver instance from map.- Returns:
- instance of WebDriver object.
-
getWebDriver
public static org.openqa.selenium.support.events.EventFiringWebDriver getWebDriver(eu.tsystems.mms.tic.testframework.webdrivermanager.WebDriverRequest webDriverRequest)
Deprecated.
-
introduceWebDriver
public static void introduceWebDriver(org.openqa.selenium.WebDriver driver)
Deprecated.Introduce an own webdriver object. Selenium session will be released in this case.- Parameters:
driver- .
-
introduceWebDriver
public static void introduceWebDriver(java.lang.String sessionKey, org.openqa.selenium.WebDriver driver)Deprecated.Introduce an own webdriver object. Selenium session will be released in this case.- Parameters:
driver- .sessionKey- .
-
isWebDriverActive
protected static java.lang.Boolean isWebDriverActive()
Deprecated.checks if web driver is active- Returns:
- true if webdriver is active, else false.
-
forceShutdown
public static void forceShutdown()
Deprecated.UseIWebDriverManager.shutdownAllThreadSessions()insteadCloses all windows and active Selenium and/or WebDriver instances.
-
shutdown
public static void shutdown()
Deprecated.UseIWebDriverManager.shutdownAllThreadSessions()instead
-
config
@Deprecated public static WebDriverManagerConfig config()
Deprecated.UsegetConfig()insteadReturns the WebDriverManagerConfig Object.- Returns:
- .
-
getConfig
@Deprecated public static WebDriverManagerConfig getConfig()
Deprecated.UsegetWebDriver(WebDriverRequest)instead
-
isJavaScriptActivated
public static boolean isJavaScriptActivated(org.openqa.selenium.WebDriver driver)
Deprecated.Returns a boolean status of the javascript activation in the browser.- Returns:
- true is js is activated, false otherwise
-
hasAnySessionActive
public static boolean hasAnySessionActive()
Deprecated.Returns true if any session is active.- Returns:
- .
-
hasSessionsActiveInThisThread
public static boolean hasSessionsActiveInThisThread()
Deprecated.
-
forceShutdownAllThreads
@Deprecated public static void forceShutdownAllThreads()
Deprecated.Are you sure you want do that?? This action quits all browser sessions in all threads.
-
makeSessionExclusive
public static java.lang.String makeSessionExclusive(org.openqa.selenium.WebDriver driver)
Deprecated.Make the session exclusive. This session will then never be closed during test execution. To close it call: WebDriverManager.reportExclusiveSession(uuid); From any steps you can call getWebDriver(uuid) or getSelenium(uuid) to get the sessions.- Parameters:
driver- .- Returns:
- UUID of this session.
-
shutdownExclusiveSession
public static void shutdownExclusiveSession(java.lang.String key)
Deprecated.
-
getWebDriversFromThread
public static java.util.stream.Stream<org.openqa.selenium.support.events.EventFiringWebDriver> getWebDriversFromThread(long threadId)
Deprecated.
-
registerWebDriverFactory
@Deprecated public static void registerWebDriverFactory(WebDriverFactory webDriverFactory, java.lang.String... browsers)
Deprecated.
-
getSessionKeyFrom
public static java.lang.String getSessionKeyFrom(org.openqa.selenium.WebDriver driver)
Deprecated.
-
setUserAgentConfig
public static void setUserAgentConfig(java.lang.String browser, UserAgentConfig configurator)Deprecated.
-
setSessionLocale
public static boolean setSessionLocale(org.openqa.selenium.WebDriver webDriver, java.util.Locale locale)Deprecated.Sets the locale for a specified session- Parameters:
webDriver-locale-- Returns:
- TRUE if locale has been set
-
getSessionLocale
public static java.util.Optional<java.util.Locale> getSessionLocale(org.openqa.selenium.WebDriver webDriver)
Deprecated.Returns the session locale- Parameters:
webDriver-
-
-