Class WebBrowser
java.lang.Object
org.uitnet.testing.smartfwk.ui.core.config.webbrowser.WebBrowser
public class WebBrowser extends Object
This is class used to perform operation on the web browser and its web pages.
- Author:
- Madhav Krishna
-
Constructor Summary
Constructors Constructor Description WebBrowser(String id, String appName, AppConfig appConfig, TestConfigManager testCfgMgr, WebBrowserFactory factory, org.openqa.selenium.WebDriver seleniumWebDriver, WebBrowserType type) -
Method Summary
Modifier and Type Method Description AppConfiggetAppConfig()StringgetAppName()StringgetId()StringgetOSName()Returns the operating system name.StringgetOSShortName()Returns the operating system short name i.e.org.openqa.selenium.WebDrivergetSeleniumWebDriver()org.sikuli.script.ScreengetSikuliScreen()TestConfigManagergetTestConfigManager()WebBrowserTypegetWebBrowserType()DimensiongetWindowSize()booleanisNewInstance()Returns true if this object is created first time else it will return false.voidopenDefaultURL()voidopenURL(String url)voidquit()Closes web browser window.voidrefresh()Refreshes the web browser.voidsetFocus()This method is used to bring the window to front to perform the operation.voidsetNewInstance(boolean newInstance)NOTE: This API is used by WebBrowserFactory class.voidwaitForMilliSeconds(long milliSeconds)voidwaitForSeconds(int seconds)
-
Constructor Details
-
WebBrowser
public WebBrowser(String id, String appName, AppConfig appConfig, TestConfigManager testCfgMgr, WebBrowserFactory factory, org.openqa.selenium.WebDriver seleniumWebDriver, WebBrowserType type)
-
-
Method Details
-
getWindowSize
-
getAppName
-
getAppConfig
-
getTestConfigManager
-
getId
-
getSeleniumWebDriver
public org.openqa.selenium.WebDriver getSeleniumWebDriver() -
getWebBrowserType
-
getSikuliScreen
public org.sikuli.script.Screen getSikuliScreen() -
openURL
-
openDefaultURL
public void openDefaultURL() -
isNewInstance
public boolean isNewInstance()Returns true if this object is created first time else it will return false.- Returns:
-
setNewInstance
public void setNewInstance(boolean newInstance)NOTE: This API is used by WebBrowserFactory class. Please avoid to use this api other places. Sets the flag to indicate weather the returning object is a new object or the existing object. Based on that Framework will do the automatic login.- Parameters:
newInstance-
-
waitForMilliSeconds
public void waitForMilliSeconds(long milliSeconds) -
waitForSeconds
public void waitForSeconds(int seconds) -
getOSName
Returns the operating system name.- Returns:
- the operating system name.
-
getOSShortName
Returns the operating system short name i.e. windows, linux- Returns:
- the operating system short name.
-
refresh
public void refresh()Refreshes the web browser. -
setFocus
public void setFocus()This method is used to bring the window to front to perform the operation. -
quit
public void quit()Closes web browser window.
-