com.github.markusbernhardt.selenium2library.keywords
Class BrowserManagement

java.lang.Object
  extended by com.github.markusbernhardt.selenium2library.keywords.BrowserManagement
Direct Known Subclasses:
Cookie

public abstract class BrowserManagement
extends Object


Field Summary
protected  double implicitWait
          Implicit wait in milliseconds
 String remoteWebDriverProxyDomain
           
 String remoteWebDriverProxyHost
           
 String remoteWebDriverProxyPassword
           
 String remoteWebDriverProxyPort
           
 String remoteWebDriverProxyUser
           
 String remoteWebDriverProxyWorkstation
           
protected  double timeout
          Timeout in milliseconds
protected  WebDriverCache webDriverCache
          Cache for all open browsers.
 
Constructor Summary
BrowserManagement()
           
 
Method Summary
 void closeAllBrowsers()
           
 void closeBrowser()
           
 void closeWindow()
           
protected  org.openqa.selenium.remote.DesiredCapabilities createDesiredCapabilities(String browserName, String desiredCapabilitiesString, String profileDirectory)
           
protected  org.openqa.selenium.WebDriver createLocalWebDriver(String browserName, org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)
           
protected  org.openqa.selenium.WebDriver createRemoteWebDriver(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities, URL remoteUrl)
           
protected  org.openqa.selenium.WebDriver createWebDriver(String browserName, String desiredCapabilitiesString, String profileDirectory, String remoteUrlString)
           
protected abstract  void debug(String msg)
           
protected abstract  List<org.openqa.selenium.WebElement> elementFind(String locator, boolean firstOnly, boolean required)
           
 String getLocation()
           
protected abstract  File getLogDir()
           
protected  String getPasswordFromURL(URL url)
           
 String getSeleniumImplicitWait()
           
 String getSeleniumSpeed()
           
 String getSeleniumTimeout()
           
 String getSource()
           
 String getTitle()
           
protected  String getUserFromURL(URL url)
           
 List<String> getWindowIdentifiers()
           
 List<String> getWindowNames()
           
 List<String> getWindowTitles()
           
 void goBack()
           
 void goTo(String url)
           
protected abstract  void html(String msg)
           
protected abstract  void info(String msg)
           
 void locationShouldBe(String url)
           
 void locationShouldContain(String url)
           
protected abstract  void log(String msg, String logLevel)
           
protected abstract  List<String> logList(List<String> items)
           
protected abstract  List<String> logList(List<String> items, String what)
           
 String logLocation()
           
 String logSource()
           
 String logSource(String logLevel)
           
 String logTitle()
           
 void maximizeBrowserWindow()
           
 String openBrowser(String url)
           
 String openBrowser(String url, String browserName)
           
 String openBrowser(String url, String browserName, String alias)
           
 String openBrowser(String url, String browserName, String alias, String remoteUrl)
           
 String openBrowser(String url, String browserName, String alias, String remoteUrl, String desiredCapabilities)
           
 String openBrowser(String url, String browserName, String alias, String remoteUrl, String desiredCapabilities, String ffProfileDir)
           
 void reloadPage()
           
 void selectFrame(String locator)
           
 void selectWindow()
           
 void selectWindow(String locator)
           
 String setBrowserImplicitWait(String timestr)
           
protected  void setRemoteWebDriverProxy(org.openqa.selenium.remote.HttpCommandExecutor httpCommandExecutor)
           
 void setRemoteWebDriverProxy(String host, String port)
           
 void setRemoteWebDriverProxy(String host, String port, String user, String password)
           
 void setRemoteWebDriverProxy(String host, String port, String user, String password, String domain, String workstation)
           
 String setSeleniumImplicitWait(String timestr)
           
 String setSeleniumSpeed(String timestr)
           
 String setSeleniumTimeout(String timestr)
           
 void switchBrowser(String indexOrAlias)
           
 void titleShouldBe(String title)
           
protected abstract  void trace(String msg)
           
 void unselectFrame()
           
protected abstract  void warn(String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

remoteWebDriverProxyHost

public String remoteWebDriverProxyHost

remoteWebDriverProxyPort

public String remoteWebDriverProxyPort

remoteWebDriverProxyUser

public String remoteWebDriverProxyUser

remoteWebDriverProxyPassword

public String remoteWebDriverProxyPassword

remoteWebDriverProxyDomain

public String remoteWebDriverProxyDomain

remoteWebDriverProxyWorkstation

public String remoteWebDriverProxyWorkstation

webDriverCache

protected WebDriverCache webDriverCache
Cache for all open browsers.


timeout

protected double timeout
Timeout in milliseconds


implicitWait

protected double implicitWait
Implicit wait in milliseconds

Constructor Detail

BrowserManagement

public BrowserManagement()
Method Detail

closeBrowser

public void closeBrowser()

openBrowser

public String openBrowser(String url)
                   throws Throwable
Throws:
Throwable

openBrowser

public String openBrowser(String url,
                          String browserName)
                   throws Throwable
Throws:
Throwable

openBrowser

public String openBrowser(String url,
                          String browserName,
                          String alias)
                   throws Throwable
Throws:
Throwable

openBrowser

public String openBrowser(String url,
                          String browserName,
                          String alias,
                          String remoteUrl)
                   throws Throwable
Throws:
Throwable

openBrowser

public String openBrowser(String url,
                          String browserName,
                          String alias,
                          String remoteUrl,
                          String desiredCapabilities)
                   throws Throwable
Throws:
Throwable

openBrowser

public String openBrowser(String url,
                          String browserName,
                          String alias,
                          String remoteUrl,
                          String desiredCapabilities,
                          String ffProfileDir)
                   throws Throwable
Throws:
Throwable

switchBrowser

public void switchBrowser(String indexOrAlias)

closeAllBrowsers

public void closeAllBrowsers()

closeWindow

public void closeWindow()

getWindowIdentifiers

public List<String> getWindowIdentifiers()

getWindowNames

public List<String> getWindowNames()

getWindowTitles

public List<String> getWindowTitles()

maximizeBrowserWindow

public void maximizeBrowserWindow()

selectFrame

public void selectFrame(String locator)

selectWindow

public void selectWindow()

selectWindow

public void selectWindow(String locator)

unselectFrame

public void unselectFrame()

getLocation

public String getLocation()

getSource

public String getSource()

getTitle

public String getTitle()

locationShouldBe

public void locationShouldBe(String url)

locationShouldContain

public void locationShouldContain(String url)

logLocation

public String logLocation()

logSource

public String logSource()

logSource

public String logSource(String logLevel)

logTitle

public String logTitle()

titleShouldBe

public void titleShouldBe(String title)

goBack

public void goBack()

goTo

public void goTo(String url)

reloadPage

public void reloadPage()

getSeleniumSpeed

public String getSeleniumSpeed()

getSeleniumTimeout

public String getSeleniumTimeout()

getSeleniumImplicitWait

public String getSeleniumImplicitWait()

setSeleniumSpeed

public String setSeleniumSpeed(String timestr)

setSeleniumTimeout

public String setSeleniumTimeout(String timestr)

setSeleniumImplicitWait

public String setSeleniumImplicitWait(String timestr)

setBrowserImplicitWait

public String setBrowserImplicitWait(String timestr)

setRemoteWebDriverProxy

public void setRemoteWebDriverProxy(String host,
                                    String port)

setRemoteWebDriverProxy

public void setRemoteWebDriverProxy(String host,
                                    String port,
                                    String user,
                                    String password)

setRemoteWebDriverProxy

public void setRemoteWebDriverProxy(String host,
                                    String port,
                                    String user,
                                    String password,
                                    String domain,
                                    String workstation)

getUserFromURL

protected String getUserFromURL(URL url)

getPasswordFromURL

protected String getPasswordFromURL(URL url)

createWebDriver

protected org.openqa.selenium.WebDriver createWebDriver(String browserName,
                                                        String desiredCapabilitiesString,
                                                        String profileDirectory,
                                                        String remoteUrlString)
                                                 throws MalformedURLException
Throws:
MalformedURLException

createLocalWebDriver

protected org.openqa.selenium.WebDriver createLocalWebDriver(String browserName,
                                                             org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)

createRemoteWebDriver

protected org.openqa.selenium.WebDriver createRemoteWebDriver(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities,
                                                              URL remoteUrl)

createDesiredCapabilities

protected org.openqa.selenium.remote.DesiredCapabilities createDesiredCapabilities(String browserName,
                                                                                   String desiredCapabilitiesString,
                                                                                   String profileDirectory)

setRemoteWebDriverProxy

protected void setRemoteWebDriverProxy(org.openqa.selenium.remote.HttpCommandExecutor httpCommandExecutor)

elementFind

protected abstract List<org.openqa.selenium.WebElement> elementFind(String locator,
                                                                    boolean firstOnly,
                                                                    boolean required)

log

protected abstract void log(String msg,
                            String logLevel)

trace

protected abstract void trace(String msg)

debug

protected abstract void debug(String msg)

info

protected abstract void info(String msg)

html

protected abstract void html(String msg)

warn

protected abstract void warn(String msg)

logList

protected abstract List<String> logList(List<String> items)

logList

protected abstract List<String> logList(List<String> items,
                                        String what)

getLogDir

protected abstract File getLogDir()


Copyright © 2013. All Rights Reserved.