Package org.alfresco.utility.web.browser
Class WebBrowser
- java.lang.Object
-
- org.openqa.selenium.support.events.EventFiringWebDriver
-
- org.alfresco.utility.web.browser.WebBrowser
-
- All Implemented Interfaces:
org.openqa.selenium.interactions.HasInputDevices,org.openqa.selenium.interactions.HasTouchScreen,org.openqa.selenium.interactions.Interactive,org.openqa.selenium.internal.WrapsDriver,org.openqa.selenium.JavascriptExecutor,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebDriver
public class WebBrowser extends org.openqa.selenium.support.events.EventFiringWebDriverA wrapper around an arbitrary WebDriver instance which supports registering of aWebDriverEventListenerfor logging purposes.- Author:
- Paul.Brodner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerLOGprotected TasPropertiesproperties
-
Constructor Summary
Constructors Constructor Description WebBrowser(org.openqa.selenium.WebDriver driver, TasProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebBrowserauthenticatedSession(org.apache.commons.httpclient.HttpState httpState)Inject auth cookie in current session so you don't need to login with LoginPagevoidcleanUpAuthenticatedSession()This is working in combination with#authenticateSession(String, String)voidclickJS(org.openqa.selenium.WebElement elementToClick)ClickWebElementwith JavaScript commandvoidcloseWindowAcceptingModalDialog()Closes the window opened leaving the browser session openedvoidcloseWindowAndSwitchBack()Closes the newly created win and swithes back to mainvoidcloseWindowAndSwitchBackParametrized(java.lang.String windowToSwitchTo, java.lang.String windowToClose)Closes the window and returns to selected windowvoiddeleteCookie(org.openqa.selenium.Cookie cookie)Delete cookie based on given cookie.voiddeleteCookies()Function to delete the cookies in the browservoiddoubleClickOnElement(org.openqa.selenium.WebElement element)Double click on an elementvoiddragAndDrop(org.openqa.selenium.WebElement source, int x, int y)Drag web element by x,y coordinatesvoiddragAndDrop(org.openqa.selenium.WebElement source, org.openqa.selenium.WebElement target)Drag the source element and drop into target element.voidexecuteJavaScript(java.lang.String command)Execute Javascript commandvoidexecuteJavaScript(java.lang.String command, org.openqa.selenium.WebElement element)Execute Javascript command withWebElementjava.util.List<org.openqa.selenium.WebElement>findDisplayedElementsFromLocator(org.openqa.selenium.By selector)This function will return list of visible elements found with the specified selectororg.openqa.selenium.WebElementfindFirstDisplayedElement(org.openqa.selenium.By locator)This function will return 1st visible element found with the specified selectororg.openqa.selenium.WebElementfindFirstElementWithExactValue(java.util.List<org.openqa.selenium.WebElement> list, java.lang.String value)This function will return 1st element found with the exact specified valueorg.openqa.selenium.WebElementfindFirstElementWithValue(java.util.List<org.openqa.selenium.WebElement> list, java.lang.String value)This function will return 1st element found which contains a specified valueorg.openqa.selenium.WebElementfindFirstElementWithValue(org.openqa.selenium.By locator, java.lang.String value)This function will return 1st element found with a specified valuevoidfocusOnWebElement(org.openqa.selenium.WebElement webElement)org.openqa.selenium.CookiegetCookie(java.lang.String name)Get a cookie that matches the name.java.lang.StringgetPreviousUrl()Gets the URL of the previously visited page.voidhandleModalDialogAcceptingAlert()voidhandleModalDialogDismissingAlert()booleanisAlertPresent()booleanisElementDisplayed(org.openqa.selenium.By locator)Returns true if the element is displayed else false.booleanisElementDisplayed(org.openqa.selenium.WebElement element)Returns true if the element is displayed else false.booleanisElementDisplayed(org.openqa.selenium.WebElement element, org.openqa.selenium.By locator)Returns true if the element is displayed else false.booleanisOptionSelectedForFilter(java.lang.String option, org.openqa.selenium.WebElement filterElement)voidmaximize()Maximizes the current window if it is not already maximizedvoidmouseOver(org.openqa.selenium.WebElement element)Recreating the action of hovering over a particular HTML element on a page.voidmouseOver(org.openqa.selenium.WebElement element, int xOffset, int yOffset)Recreating the action of hovering over with offset coordinates a particular HTML element on a page.voidrefresh()Acts as a refresh page action similar to F5 key.voidrightClickOnElement(org.openqa.selenium.WebElement element)Right click on an elementvoidscrollIntoView(org.openqa.selenium.WebElement element)Scroll to WebElementvoidscrollToElement(org.openqa.selenium.WebElement element)Scroll to WebElementvoidselectOptionFromFilterOptionsList(java.lang.String option, java.util.List<org.openqa.selenium.WebElement> filterOptionsList)This function selects specified filter option from filter options listvoidswitchToDefaultContent()Method to switch back from i-frame to default content.voidswitchToFrame(java.lang.String frameId)Method to switch on to frames of content object.voidswitchToWindow(java.lang.String windowHandle)This method transfers the control to the specific window as per the given window handle.voidswitchWindow()Switches to the newly created window.voidswitchWindow(int windowIndex)Waits and switches to window based on indexvoidswitchWindow(java.lang.String winHandler)Switches to window with specified url.voidwaitInSeconds(int seconds)Method to wait for given seconds.org.openqa.selenium.WebElementwaitUntilChildElementIsPresent(org.openqa.selenium.By parentLocator, org.openqa.selenium.By childLocator)Wait for child WebElement as a part of parent element to presentorg.openqa.selenium.WebElementwaitUntilChildElementIsPresent(org.openqa.selenium.By parentLocator, org.openqa.selenium.By childLocator, long timeOutInSeconds)Wait for child WebElement as a part of parent element to presentorg.openqa.selenium.WebElementwaitUntilChildElementIsPresent(org.openqa.selenium.WebElement parentLocator, org.openqa.selenium.By childLocator)Wait for child WebElement as a part of parent element to presentorg.openqa.selenium.WebElementwaitUntilChildElementIsPresent(org.openqa.selenium.WebElement parentLocator, org.openqa.selenium.By childLocator, long timeOutInSeconds)Wait for child WebElement as a part of parent element to presentorg.openqa.selenium.WebElementwaitUntilElementClickable(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until the Clickable of given Element for given seconds.org.openqa.selenium.WebElementwaitUntilElementClickable(org.openqa.selenium.WebElement element)Wait until the Clickable of given Element for given seconds.org.openqa.selenium.WebElementwaitUntilElementClickable(org.openqa.selenium.WebElement element, long timeOutInSeconds)Wait until the Clickable of given Element for given seconds.voidwaitUntilElementContainsText(org.openqa.selenium.WebElement element, java.lang.String text)Wait until the given text is present in the given ElementvoidwaitUntilElementDeletedFromDom(org.openqa.selenium.By locator)Wait Until element successfully deleting from DOM.voidwaitUntilElementDeletedFromDom(org.openqa.selenium.By locator, long timeOutInSeconds)Wait Until element successfully deleting from DOM.voidwaitUntilElementDisappears(org.openqa.selenium.By locator)Wait until the invisibility of given Element for given seconds.voidwaitUntilElementDisappears(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until the invisibility of given Element for given seconds.voidwaitUntilElementDisappearsWithRetry(org.openqa.selenium.By locator, int secondsToWait)Wait the element to disappear by refreshing the pagevoidwaitUntilElementDoesNotContainText(org.openqa.selenium.WebElement element, java.lang.String text)Wait until the given text is not present in the given ElementvoidwaitUntilElementHasAttribute(org.openqa.selenium.WebElement element, java.lang.String attribute, java.lang.String value)Wait until the element has attribute for the specified amount of time.voidwaitUntilElementIsDisplayedWithRetry(org.openqa.selenium.By locator)Wait the element is displayed by refreshing the pagevoidwaitUntilElementIsDisplayedWithRetry(org.openqa.selenium.By locator, int secondsToWait)Wait the element is displayed by refreshing the pageorg.openqa.selenium.WebElementwaitUntilElementIsPresent(org.openqa.selenium.By locator)Wait until element is present on the DOM of a page.org.openqa.selenium.WebElementwaitUntilElementIsPresent(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until element is present on the DOM of a page.voidwaitUntilElementIsVisibleWithRetry(org.openqa.selenium.By locator, int retryCount)Wait until element is visible with retryjava.util.List<org.openqa.selenium.WebElement>waitUntilElementsVisible(java.util.List<org.openqa.selenium.WebElement> elements)Helper method to find and return a slow loading collection ofWebElement.java.util.List<org.openqa.selenium.WebElement>waitUntilElementsVisible(org.openqa.selenium.By locator)Helper method to find and return a slow loading collection ofWebElement.org.openqa.selenium.WebElementwaitUntilElementVisible(org.openqa.selenium.By locator)Wait until the element is visible for the specified amount of time.org.openqa.selenium.WebElementwaitUntilElementVisible(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until the element is visible for the specified amount of time.org.openqa.selenium.WebElementwaitUntilElementVisible(org.openqa.selenium.WebElement element)Wait until the element is visible for the specified amount of time.org.openqa.selenium.WebElementwaitUntilElementVisible(org.openqa.selenium.WebElement element, long timeOutInSeconds)Wait until the element is visible for the specified amount of time.voidwaitUntilWebElementIsDisplayedWithRetry(org.openqa.selenium.WebElement webElement)Wait until one element is displayed by refreshing the pagevoidwaitUntilWebElementIsDisplayedWithRetry(org.openqa.selenium.WebElement webElement, int secondsToWait)Wait until one element is displayed by refreshing the pagevoidwaitUrlContains(java.lang.String URLfraction, long timeOutInSeconds)Wait until url contains the given URL fraction.-
Methods inherited from class org.openqa.selenium.support.events.EventFiringWebDriver
close, executeAsyncScript, executeScript, findElement, findElements, get, getCurrentUrl, getKeyboard, getMouse, getPageSource, getScreenshotAs, getTitle, getTouch, getWindowHandle, getWindowHandles, getWrappedDriver, manage, navigate, perform, quit, register, resetInputState, switchTo, unregister
-
-
-
-
Field Detail
-
LOG
protected static final org.slf4j.Logger LOG
-
properties
protected TasProperties properties
-
-
Constructor Detail
-
WebBrowser
public WebBrowser(org.openqa.selenium.WebDriver driver, TasProperties properties)
-
-
Method Detail
-
authenticatedSession
public WebBrowser authenticatedSession(org.apache.commons.httpclient.HttpState httpState)
Inject auth cookie in current session so you don't need to login with LoginPage
-
cleanUpAuthenticatedSession
public void cleanUpAuthenticatedSession()
This is working in combination with#authenticateSession(String, String)
-
mouseOver
public void mouseOver(org.openqa.selenium.WebElement element)
Recreating the action of hovering over a particular HTML element on a page.- Parameters:
element-WebElementtarget
-
mouseOver
public void mouseOver(org.openqa.selenium.WebElement element, int xOffset, int yOffset)Recreating the action of hovering over with offset coordinates a particular HTML element on a page.- Parameters:
element-WebElementtarget
-
refresh
public void refresh()
Acts as a refresh page action similar to F5 key.
-
waitUntilElementHasAttribute
public void waitUntilElementHasAttribute(org.openqa.selenium.WebElement element, java.lang.String attribute, java.lang.String value)Wait until the element has attribute for the specified amount of time.- Parameters:
element-
-
waitUntilElementVisible
public org.openqa.selenium.WebElement waitUntilElementVisible(org.openqa.selenium.By locator)
Wait until the element is visible for the specified amount of time.- Parameters:
locator-Bylocator
-
waitUntilElementVisible
public org.openqa.selenium.WebElement waitUntilElementVisible(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until the element is visible for the specified amount of time.- Parameters:
locator-BylocatortimeOutInSeconds- timeout in seconds
-
waitUntilElementIsPresent
public org.openqa.selenium.WebElement waitUntilElementIsPresent(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until element is present on the DOM of a page.- Parameters:
locator-BylocatortimeOutInSeconds- seconds to wait- Returns:
WebElement
-
waitUntilElementIsPresent
public org.openqa.selenium.WebElement waitUntilElementIsPresent(org.openqa.selenium.By locator)
Wait until element is present on the DOM of a page.- Parameters:
locator-Bylocator- Returns:
WebElement
-
waitUntilChildElementIsPresent
public org.openqa.selenium.WebElement waitUntilChildElementIsPresent(org.openqa.selenium.By parentLocator, org.openqa.selenium.By childLocator, long timeOutInSeconds)Wait for child WebElement as a part of parent element to present- Parameters:
parentLocator-Byparent locatorchildLocator-Bychild locatortimeOutInSeconds- seconds to wait- Returns:
WebElement
-
waitUntilChildElementIsPresent
public org.openqa.selenium.WebElement waitUntilChildElementIsPresent(org.openqa.selenium.By parentLocator, org.openqa.selenium.By childLocator)Wait for child WebElement as a part of parent element to present- Parameters:
parentLocator-Byparent locatorchildLocator-Bychild locator- Returns:
WebElement
-
waitUntilChildElementIsPresent
public org.openqa.selenium.WebElement waitUntilChildElementIsPresent(org.openqa.selenium.WebElement parentLocator, org.openqa.selenium.By childLocator, long timeOutInSeconds)Wait for child WebElement as a part of parent element to present- Parameters:
parentLocator-WebElementparent locatorchildLocator-Bychild locatortimeOutInSeconds- seconds to wait- Returns:
WebElement
-
waitUntilChildElementIsPresent
public org.openqa.selenium.WebElement waitUntilChildElementIsPresent(org.openqa.selenium.WebElement parentLocator, org.openqa.selenium.By childLocator)Wait for child WebElement as a part of parent element to present- Parameters:
parentLocator-WebElementparent locatorchildLocator-Bychild locator- Returns:
WebElement
-
waitUntilElementVisible
public org.openqa.selenium.WebElement waitUntilElementVisible(org.openqa.selenium.WebElement element)
Wait until the element is visible for the specified amount of time.- Parameters:
element-WebElementweb element
-
waitUntilElementVisible
public org.openqa.selenium.WebElement waitUntilElementVisible(org.openqa.selenium.WebElement element, long timeOutInSeconds)Wait until the element is visible for the specified amount of time.- Parameters:
element-WebElementweb elementtimeOutInSeconds- timeout in seconds
-
waitUntilElementsVisible
public java.util.List<org.openqa.selenium.WebElement> waitUntilElementsVisible(org.openqa.selenium.By locator)
Helper method to find and return a slow loading collection ofWebElement.- Parameters:
criteria-Bysearch criteria- Returns:
- Collection of
WebElementHTML elements
-
waitUntilElementsVisible
public java.util.List<org.openqa.selenium.WebElement> waitUntilElementsVisible(java.util.List<org.openqa.selenium.WebElement> elements)
Helper method to find and return a slow loading collection ofWebElement.- Parameters:
elements-WebElementsearch criteria- Returns:
- Collection of
WebElementHTML elements
-
waitUntilElementIsDisplayedWithRetry
public void waitUntilElementIsDisplayedWithRetry(org.openqa.selenium.By locator)
Wait the element is displayed by refreshing the page- Parameters:
locator-Byquery
-
waitUntilElementIsDisplayedWithRetry
public void waitUntilElementIsDisplayedWithRetry(org.openqa.selenium.By locator, int secondsToWait)Wait the element is displayed by refreshing the page- Parameters:
locator-ByquerysecondsToWait-
-
waitUntilElementDisappearsWithRetry
public void waitUntilElementDisappearsWithRetry(org.openqa.selenium.By locator, int secondsToWait)Wait the element to disappear by refreshing the page- Parameters:
locator-ByquerysecondsToWait-
-
waitUntilWebElementIsDisplayedWithRetry
public void waitUntilWebElementIsDisplayedWithRetry(org.openqa.selenium.WebElement webElement)
Wait until one element is displayed by refreshing the page- Parameters:
webElement-
-
waitUntilWebElementIsDisplayedWithRetry
public void waitUntilWebElementIsDisplayedWithRetry(org.openqa.selenium.WebElement webElement, int secondsToWait)Wait until one element is displayed by refreshing the page- Parameters:
webElement-secondsToWait-
-
waitUntilElementClickable
public org.openqa.selenium.WebElement waitUntilElementClickable(org.openqa.selenium.WebElement element)
Wait until the Clickable of given Element for given seconds.- Parameters:
element- WebElement
-
waitUntilElementClickable
public org.openqa.selenium.WebElement waitUntilElementClickable(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until the Clickable of given Element for given seconds.- Parameters:
locator- CSS LocatortimeOutInSeconds- Timeout In Seconds
-
waitUntilElementClickable
public org.openqa.selenium.WebElement waitUntilElementClickable(org.openqa.selenium.WebElement element, long timeOutInSeconds)Wait until the Clickable of given Element for given seconds.- Parameters:
element- WebElementtimeOutInSeconds- Timeout In Seconds
-
waitUntilElementContainsText
public void waitUntilElementContainsText(org.openqa.selenium.WebElement element, java.lang.String text)Wait until the given text is present in the given Element- Parameters:
element- WebElement
-
waitUrlContains
public void waitUrlContains(java.lang.String URLfraction, long timeOutInSeconds)Wait until url contains the given URL fraction.- Parameters:
URLfraction-timeOutInSeconds-
-
waitUntilElementDeletedFromDom
public void waitUntilElementDeletedFromDom(org.openqa.selenium.By locator)
Wait Until element successfully deleting from DOM.- Parameters:
locator-Bylocator
-
waitUntilElementDeletedFromDom
public void waitUntilElementDeletedFromDom(org.openqa.selenium.By locator, long timeOutInSeconds)Wait Until element successfully deleting from DOM.- Parameters:
locator-BylocatortimeOutInSeconds- time to wait
-
waitUntilElementDisappears
public void waitUntilElementDisappears(org.openqa.selenium.By locator)
Wait until the invisibility of given Element for given seconds.- Parameters:
locator- CSS Locator
-
waitUntilElementDisappears
public void waitUntilElementDisappears(org.openqa.selenium.By locator, long timeOutInSeconds)Wait until the invisibility of given Element for given seconds.- Parameters:
locator-ByLocatortimeOutInSeconds- timeout In Seconds
-
isElementDisplayed
public boolean isElementDisplayed(org.openqa.selenium.By locator)
Returns true if the element is displayed else false.- Parameters:
locator-Byquery- Returns:
- boolean true if displayed
-
isElementDisplayed
public boolean isElementDisplayed(org.openqa.selenium.WebElement element)
Returns true if the element is displayed else false.- Parameters:
element-Byquery- Returns:
- boolean true if displayed
-
isElementDisplayed
public boolean isElementDisplayed(org.openqa.selenium.WebElement element, org.openqa.selenium.By locator)Returns true if the element is displayed else false.- Parameters:
locator-WebElementqueryByquery- Returns:
- boolean true if displayed
-
getPreviousUrl
public java.lang.String getPreviousUrl()
Gets the URL of the previously visited page. The previous url is only displayed once interacted with the page. If user uses drone.navigetTo it will treat it as an entry page and will not have a previous page url.- Returns:
- String previous page URL
-
switchToFrame
public void switchToFrame(java.lang.String frameId)
Method to switch on to frames of content object.- Parameters:
frameId- String identifier
-
switchToDefaultContent
public void switchToDefaultContent()
Method to switch back from i-frame to default content.
-
switchWindow
public void switchWindow()
Switches to the newly created window.
-
switchWindow
public void switchWindow(int windowIndex)
Waits and switches to window based on index
-
switchWindow
public void switchWindow(java.lang.String winHandler)
Switches to window with specified url.
-
closeWindowAndSwitchBack
public void closeWindowAndSwitchBack()
Closes the newly created win and swithes back to main
-
closeWindowAndSwitchBackParametrized
public void closeWindowAndSwitchBackParametrized(java.lang.String windowToSwitchTo, java.lang.String windowToClose)Closes the window and returns to selected window
-
closeWindowAcceptingModalDialog
public void closeWindowAcceptingModalDialog()
Closes the window opened leaving the browser session opened
-
switchToWindow
public void switchToWindow(java.lang.String windowHandle)
This method transfers the control to the specific window as per the given window handle.- Parameters:
windowHandle- identifier
-
getCookie
public org.openqa.selenium.Cookie getCookie(java.lang.String name)
Get a cookie that matches the name.- Parameters:
name- String cookie identifier- Returns:
- Cookie object
-
deleteCookies
public void deleteCookies()
Function to delete the cookies in the browser
-
deleteCookie
public void deleteCookie(org.openqa.selenium.Cookie cookie)
Delete cookie based on given cookie.- Parameters:
cookie-Cookieobject to be deleted.
-
maximize
public void maximize()
Maximizes the current window if it is not already maximized
-
dragAndDrop
public void dragAndDrop(org.openqa.selenium.WebElement source, org.openqa.selenium.WebElement target)Drag the source element and drop into target element.- Parameters:
source- SourceWebElementtarget- TargetWebElement
-
dragAndDrop
public void dragAndDrop(org.openqa.selenium.WebElement source, int x, int y)Drag web element by x,y coordinates- Parameters:
source- htmlWebElementx- coordinatey- coordinate
-
doubleClickOnElement
public void doubleClickOnElement(org.openqa.selenium.WebElement element)
Double click on an element- Parameters:
element-WebElement
-
rightClickOnElement
public void rightClickOnElement(org.openqa.selenium.WebElement element)
Right click on an element- Parameters:
element-WebElement
-
findFirstDisplayedElement
public org.openqa.selenium.WebElement findFirstDisplayedElement(org.openqa.selenium.By locator)
This function will return 1st visible element found with the specified selector- Parameters:
locator-Byselector type- Returns:
WebElementelement to interact
-
findFirstElementWithValue
public org.openqa.selenium.WebElement findFirstElementWithValue(org.openqa.selenium.By locator, java.lang.String value)This function will return 1st element found with a specified value- Parameters:
locator-Byidentifier- Returns:
ListofWebElement
-
findFirstElementWithValue
public org.openqa.selenium.WebElement findFirstElementWithValue(java.util.List<org.openqa.selenium.WebElement> list, java.lang.String value)This function will return 1st element found which contains a specified value- Parameters:
list-Listidentifier- Returns:
ListofWebElement
-
findFirstElementWithExactValue
public org.openqa.selenium.WebElement findFirstElementWithExactValue(java.util.List<org.openqa.selenium.WebElement> list, java.lang.String value)This function will return 1st element found with the exact specified value- Parameters:
list-value-- Returns:
-
findDisplayedElementsFromLocator
public java.util.List<org.openqa.selenium.WebElement> findDisplayedElementsFromLocator(org.openqa.selenium.By selector)
This function will return list of visible elements found with the specified selector- Parameters:
selector-Byidentifier- Returns:
ListofWebElement
-
selectOptionFromFilterOptionsList
public void selectOptionFromFilterOptionsList(java.lang.String option, java.util.List<org.openqa.selenium.WebElement> filterOptionsList)This function selects specified filter option from filter options list- Parameters:
option- Option to be selectedfilterOptionsList- The filter Option List
-
isOptionSelectedForFilter
public boolean isOptionSelectedForFilter(java.lang.String option, org.openqa.selenium.WebElement filterElement)
-
scrollToElement
public void scrollToElement(org.openqa.selenium.WebElement element)
Scroll to WebElement- Parameters:
element- WebElement
-
scrollIntoView
public void scrollIntoView(org.openqa.selenium.WebElement element)
Scroll to WebElement- Parameters:
element- WebElement
-
waitInSeconds
public void waitInSeconds(int seconds)
Method to wait for given seconds.- Parameters:
seconds- time in seconds
-
executeJavaScript
public void executeJavaScript(java.lang.String command)
Execute Javascript command- Parameters:
command-
-
executeJavaScript
public void executeJavaScript(java.lang.String command, org.openqa.selenium.WebElement element)Execute Javascript command withWebElement- Parameters:
command-element-WebElement
-
clickJS
public void clickJS(org.openqa.selenium.WebElement elementToClick)
ClickWebElementwith JavaScript command- Parameters:
elementToClick-
-
isAlertPresent
public boolean isAlertPresent()
-
handleModalDialogAcceptingAlert
public void handleModalDialogAcceptingAlert()
-
handleModalDialogDismissingAlert
public void handleModalDialogDismissingAlert()
-
focusOnWebElement
public void focusOnWebElement(org.openqa.selenium.WebElement webElement)
-
waitUntilElementIsVisibleWithRetry
public void waitUntilElementIsVisibleWithRetry(org.openqa.selenium.By locator, int retryCount)Wait until element is visible with retry- Parameters:
locator-retryCount-
-
waitUntilElementDoesNotContainText
public void waitUntilElementDoesNotContainText(org.openqa.selenium.WebElement element, java.lang.String text)Wait until the given text is not present in the given Element- Parameters:
element- WebElement
-
-