public class WebInteractionMethods extends Object
| Modifier and Type | Field and Description |
|---|---|
org.openqa.selenium.WebDriver |
driver |
| Constructor and Description |
|---|
WebInteractionMethods(TestCase testCase)
Setting up the possibility to interact with web components
|
WebInteractionMethods(TestCase testCase,
org.openqa.selenium.WebDriver driver) |
WebInteractionMethods(TestCase testCase,
WebDriverManager.WebBrowserType browserType)
Attempts to create a WebDriver instance to use for the specified browser type
|
| Modifier and Type | Method and Description |
|---|---|
ActionResult |
acceptAlert()
Sending accept to popup
|
protected boolean |
bufferedImagesAreEqual(BufferedImage img1,
BufferedImage img2) |
ActionResult |
chooseRadioButton(GuiElement radioButtonContainer,
String text)
Chooses a selection in a radio button set
|
ActionResult |
click(GuiElement guiElement)
Performing a click event on an element.
|
ActionResult |
click(GuiElement guiElement,
int timeoutInSeconds)
Performing a click event on an element.
|
ActionResult |
clickEvenIfDisabled(GuiElement guiElement,
int timeoutInSeconds)
Performing a click event on an element.
|
ActionResult |
clickOnElementWithTheVisibleText(String visibleText)
In some cases you might want to click on an element with a visible text without declaring the element itself.
|
ActionResult |
closeBrowser()
Closes the web browser.
|
ActionResult |
closeCurrentBrowserTab()
Closes the current browser tab.
|
Object |
executeJavascript(String script) |
boolean |
exists(DomElement domElement)
Checks for existence of given element.
|
boolean |
exists(GuiElement element)
Checks for existence of given element.
|
boolean |
existsWithTimeout(GuiElement guiElement,
int timeOutInSeconds)
Checks for existence of given element.
|
List<org.openqa.selenium.logging.LogEntry> |
getLogEntriesFromBrowser(Level lowestLogLevel) |
Integer |
getRuntimeElementMatchCount(DomElement domElement) |
org.openqa.selenium.WebElement |
getRuntimeElementWithoutLogging(DomElement element)
Gets a runtime element from the WebDriver driver to be able to interact with it
|
org.openqa.selenium.WebElement |
getRuntimeElementWithoutLogging(DomElement parent,
DomElement descendantToReturn)
Gets a runtime element from the WebDriver driver to be able to interact with it
|
org.openqa.selenium.WebElement |
getRuntimeElementWithTimeout(DomElement element,
int timeoutInSeconds)
Gets a runtime element from the WebDriver driver to be able to interact with it
|
String |
getSelectedValueFromDropdown(GuiElement guiElement) |
int |
getStandardTimeout() |
TestCase |
getTestCase()
Returns the test case.
|
String |
getText(GuiElement guiElement)
Reads the text from an element
|
String |
getTextWithoutLogging(GuiElement guiElement)
Reads the text from an element
|
ActionResult |
goBack()
Browser back button
|
protected BufferedImage |
grabElementImage(DomElement domElement) |
void |
haltFurtherExecution()
Halts further execution of the test case when further execution is considered non-valuable
|
ActionResult |
hover(GuiElement guiElement)
Holds mouse cursor over given element
|
boolean |
isDisplayed(GuiElement guiElement)
Checks if the given element is displayed in the GUI.
|
boolean |
isDisplayedWithoutTimeout(GuiElement guiElement)
Checks if the element is displayed directly.
|
boolean |
isEnabled(GuiElement guiElement)
Returns if the element is able to interact with (actually if it is displayed and enabled)
|
boolean |
isNotDisplayed(GuiElement guiElement)
Checks if the given element is displayed in the GUI.
|
boolean |
isNotDisplayedExactlyNow(GuiElement guiElement)
Checks if the given element is displayed in the GUI.
|
boolean |
isNotDisplayedWithinTimeout(GuiElement guiElement,
int timeoutInSeconds)
Checks if the given element is displayed in the GUI.
|
void |
log(LogLevel logLevel,
String message)
Writes a testCaseLog post to the testCaseLog
|
void |
logOutputFromBrowserConsole_AlsoClearsBrowserConsole()
Logs entries in browser console to test case log.
|
ActionResult |
makeSureDriverIsClosed()
Makes sure the driver is closed
|
ActionResult |
manageCheckbox(GuiElement checkboxElement,
Boolean expectedToBeTicked)
Ticking or un-ticking checkboxes.
|
ActionResult |
mapCurrentPage(String outputFilePath)
Creates the DomElements that are easily identified on current path to draft code in output file.
|
ActionResult |
mapCurrentPageThorough(String outputFilePath)
Deprecated.
Still evolving. Still unstable.
|
ActionResult |
mapCurrentPageWithBy(String outputFilePath,
boolean quickAndSloppyMode)
Maps the element of the current page to a page element file.
|
ActionResult |
navigate(String url)
Navigates to specified url
|
boolean |
pageTitleExistWithTimeout(String expectedPageTitle,
int timeoutInSeconds) |
boolean |
pageTitleMatchRegexWithTimeout(String expectedPageTitleRegEx,
int timeoutInSeconds) |
ActionResult |
pickTableRow(GuiElement guiTableElement,
String[] textsToFindOnRow)
Clicks the row matching the given strings in a table
|
ActionResult |
reloadPage()
Reloads the page.
|
ActionResult |
reportBrokenLinksOnCurrentPage_IncludeAllLinksAlsoNonDisplayedLinks() |
ActionResult |
reportBrokenLinksOnCurrentPage() |
ActionResult |
reportBrokenLinksRecursive()
Checks current page for broken links and reports results to log as verifications.
|
ActionResult |
saveDesktopScreenshot()
Saving desktop of full desktop rather than just the web browser
|
ActionResult |
saveDomElementScreenshot(DomElement domElement,
String filePath)
Capture image of specific element to disk.
|
ActionResult |
saveHtmlContentOfCurrentPage()
Saves the current HTML of the page interacted with to the testCaseLog folder for debugging purposes and write a testCaseLog post about it
Used for provide debugging information when execution or verification problems (or errors) occur.
|
ActionResult |
saveScreenshot(org.openqa.selenium.WebElement relevantWebElementToMarkWithBorder)
Saves a screenshot of the web browser content to the testCaseLog folder and writes a testCaseLog post about it.
|
ActionResult |
selectInDropdown(GuiElement guiElement,
String selection)
Selecting an option in a dropdown element by visible text
|
ActionResult |
selectInMultipleChoiceDropdown(GuiElement dropdownElement,
ArrayList<String> selectedOptions)
Selecting multiple choices in a dropdown element (deselects what's in it to begin with.
|
ActionResult |
setBrowserWindowSize(int width,
int height)
Re-scaling the browser window to a new size.
|
ActionResult |
setStandardTimeout(int standardTimeoutInSeconds)
Changing the standard timeout value for waiting for objects in the GUI for most methods.
|
ActionResult |
submitText(GuiElement guiElement,
String text)
Writes text and triggers a submit of it to an element
|
ActionResult |
switchBrowserTab(String tabNameForTabToSwitchTo)
Changes what browser tab is currently activated.
|
ActionResult |
switchBrowserTabWithTabNameGivenAsRegexPattern(String tabNameAsRegexForTabToSwitchTo)
Changes what browser tab is currently activated.
|
TableData |
tableDataFromGuiElement(GuiElement guiElement,
boolean logErrors) |
boolean |
tableIsEmpty(GuiElement tableElement)
Checks if table data rows are empty/doesn't exist.
|
boolean |
tableRowExists(GuiElement tableElement,
String headlineColonValueSemicolonSeparatedString,
boolean regex)
Checks if a certain row exist in table.
|
boolean |
tableRowExists(GuiElement tableElement,
String headlineColonValueSemicolonSeparatedString,
CellMatchingType cellMatchingType)
Checks if a certain row exist in table.
|
boolean |
tableRowExistsWithTimeout(GuiElement tableElement,
String headlineColonValueSemicolonSeparatedString,
CellMatchingType cellMatchingType)
Checks if a certain row exist in table.
|
boolean |
textExistInPageSourceOfCurrentPageWithinTimeout(String text,
int timeoutInSeconds)
Deprecated.
Use method under
verify() instead. |
boolean |
textExistOnCurrentPageWithinTimeout(String text,
int timeoutInSeconds)
Checks if specified text exist (maybe not displayed) on the current browser page
|
boolean |
textIsDisplayedOnCurrentPageWithinTimeout(String text,
int timeoutInSeconds)
Checks if specified text is displayed on the current browser page
|
void |
wait(int milliseconds)
Pauses execution for a number of milliseconds.
|
ActionResult |
waitForElementToAppear(GuiElement guiElement)
Waits for the given element to appear.
|
ActionResult |
waitForElementToAppear(GuiElement guiElement,
int timeoutInSeconds)
Pauses execution until given element is displayed.
|
org.openqa.selenium.WebElement |
waitForElementToBeEnabled(GuiElement guiElement,
int timeoutInSeconds)
Pauses execution until given element is displayed.
|
ActionResult |
waitForElementToDisappear(GuiElement guiElement)
Waiting for element to disappear.
|
ActionResult |
waitForElementToDisappear(GuiElement guiElement,
int timeoutInSeconds)
Pausing execution until the given element has disappeared.
|
boolean |
waitForElementToFinishAnimation(DomElement domElement,
int timeoutInSeconds)
Waits for the element image to stop changing.
|
boolean |
waitForElementToFinishAnimation(GuiElement guiElement)
Waits for the element image to stop changing.
|
ElementVerificationMethods |
verifiyElement(DomElement domElement) |
BrowserVerificationMethods |
verify() |
void |
verifyBrowserConsoleHasNoErrors_AlsoClearsBrowserConsole()
Deprecated.
Use method under
verify()} instead |
ActionResult |
verifyCurrentPageSourceWithW3validator(boolean verbose)
Deprecated.
Use method under
verify() instead |
ActionResult |
verifyElementAttribute(GuiElement linkElement,
String attributeName,
String expectedAttributeValue)
Deprecated.
Use attribute() method under
verifiyElement(DomElement) instead. |
ActionResult |
verifyElementAttributeRegex(GuiElement linkElement,
String attributeName,
String expectedAttributevalueAsRegex)
Deprecated.
Use attribute() method under
verifiyElement(DomElement) instead. |
void |
verifyElementDoesNotExist(GuiElement guiElement)
Deprecated.
Use doesNotExist() method under
verifiyElement(DomElement) instead. |
void |
verifyElementDoesNotExistWithTimeout(GuiElement guiElement,
int timeoutInSeconds)
Deprecated.
Use method under
verifiyElement(DomElement) instead. |
void |
verifyElementExistence(GuiElement guiElement)
Deprecated.
Use exists() method under
verifiyElement(DomElement) instead. |
void |
verifyElementExistenceWithTimeout(GuiElement guiElement,
int timeoutInSeconds)
Deprecated.
Use exists() method under
verifiyElement(DomElement) instead. |
void |
verifyElementIsAnimated(DomElement domElement,
int timeoutInSeconds)
Deprecated.
Use isAnimated() under
verifiyElement(DomElement)} instead |
void |
verifyElementIsDisplayed(GuiElement guiElement)
Deprecated.
Use isDisplayed() method under
verifiyElement(DomElement) instead. |
void |
verifyElementIsNotDisplayed(GuiElement guiElement)
Deprecated.
Use isNotDisplayed() method under
verifiyElement(DomElement) instead. |
void |
verifyElementIsNotDisplayedWithTimeout(GuiElement guiElement,
int timeoutInSeconds)
Deprecated.
Use isNotDisplayed() method under
verifiyElement(DomElement) instead. |
void |
verifyElementText(GuiElement guiElement,
String expectedText)
Deprecated.
Use method under
verifiyElement(DomElement)} instead |
void |
verifyElementTextContainsText(GuiElement guiElement,
String expectedText)
Deprecated.
Use method textContains() under
verifiyElement(DomElement)} instead |
void |
verifyElementTextWithRegexPattern(GuiElement guiElement,
String expectedTextAsRegexPattern)
Deprecated.
Use method text() under
verifiyElement(DomElement)} instead |
void |
verifyImage(GuiElement guiElement,
String pathToOracleImage)
Deprecated.
Need new implementation
|
void |
verifyIsEnabled(GuiElement guiElement)
Deprecated.
Use method isEnabled() under
verifiyElement(DomElement)} instead |
void |
verifyObjectDoesNotExist(GuiElement guiElement)
Deprecated.
Use doesNotExist() method under
verifiyElement(DomElement) instead. |
void |
verifyObjectDoesNotExistWithTimeout(GuiElement guiElement,
int timeoutInSeconds)
Deprecated.
Use doesNotExist() method under
verifiyElement(DomElement) instead. |
void |
verifyObjectExistence(GuiElement guiElement)
Deprecated.
Use exists() method under
verifiyElement(DomElement) instead. |
void |
verifyObjectExistenceWithTimeout(GuiElement guiElement,
int timeoutInSeconds)
Deprecated.
Use method exists() under
verifiyElement(DomElement) instead (and set the timeout). |
void |
verifyObjectIsDisplayed(GuiElement guiElement)
Deprecated.
Use isDisplayed() method under
verifiyElement(DomElement) instead. |
void |
verifyObjectIsNotDisplayed(GuiElement guiElement)
Deprecated.
Use isNotDisplayed() method under
verifiyElement(DomElement) instead. |
void |
verifyObjectIsNotDisplayedWithTimeout(GuiElement guiElement,
int timeoutInSeconds)
Deprecated.
Use isNotDisplayed() method under
verifiyElement(DomElement) instead. |
void |
verifyPageTitle(String expectedTitle)
Deprecated.
Use
verify().title() instead. |
void |
verifyPageTitleAsRegex(String expectedTitleAsRegexPattern)
Deprecated.
Use
verify().title() instead. |
void |
verifyPageTitleAsRegexWithTimeout(String expectedTitleAsRegexPattern,
int timeoutInSeconds)
Deprecated.
Use
verify().title() instead. |
void |
verifyPageTitleWithTimeout(String expectedTitle,
int timeoutInSeconds)
Deprecated.
Use
verify().title() instead. |
boolean |
verifyPDFContent(String strURL,
String reqTextInPDF) |
void |
verifyTableHeadline(GuiElement tableElement,
String expectedHeadline)
Deprecated.
Use method tableHeadlines() under
verifiyElement(DomElement)} instead |
void |
verifyTableHeadlines(GuiElement tableElement,
List<String> expectedHeadlines)
Deprecated.
Use method tableHeadlines() under
verifiyElement(DomElement)} instead |
void |
verifyTableRow(GuiElement tableElement,
String headlineColonValueSemicolonSeparatedString,
CellMatchingType cellMatchingType)
Deprecated.
Use method tableRow() under
verifiyElement(DomElement)} instead |
void |
verifyTableRows(GuiElement guiElement,
String[] headlineColonValueSemicolonSeparatedString,
CellMatchingType cellMatchingType)
Deprecated.
Use method tableRows() under
verifiyElement(DomElement)} instead |
void |
verifyTextAsRegexPatternExistInPageSource(String textAsRegexPattern)
Deprecated.
Use method under
verify() instead |
void |
verifyTextExistOnCurrentPage(String text)
Deprecated.
Use method under
verify() instead. |
ActionResult |
write(GuiElement guiElement,
String textToWrite)
Writes text to the given element.
|
ActionResult |
writeAfterClear(GuiElement guiElement,
String textToWrite)
Writes text to the given element after the element value has been cleared.
|
ActionResult |
writeRunningProcessListDeviationsSinceTestCaseStart()
When a test case object is created a snapshot of running processes is created.
|
public WebInteractionMethods(TestCase testCase)
testCase - the test case to write testCaseLog messages topublic WebInteractionMethods(TestCase testCase, WebDriverManager.WebBrowserType browserType)
testCase - The test case to log tobrowserType - The type of browser to try to create driver instance forpublic WebInteractionMethods(TestCase testCase, org.openqa.selenium.WebDriver driver)
public int getStandardTimeout()
public TestCase getTestCase()
public void wait(int milliseconds)
milliseconds - The number of milliseconds to wait.public ActionResult goBack()
public BrowserVerificationMethods verify()
public void log(LogLevel logLevel, String message)
logLevel - The testCaseLog level of the testCaseLog postmessage - The testCaseLog message stringpublic ActionResult navigate(String url)
url - The string formed url to navigate topublic ActionResult mapCurrentPageWithBy(String outputFilePath, boolean quickAndSloppyMode)
outputFilePath - The path to the output filequickAndSloppyMode - The quickAndSloppyMode does not perform the time
consuming recursive check if elements can be uniquely identified with a sub-element
search from any parent.public ActionResult mapCurrentPage(String outputFilePath)
mapCurrentPageThorough() method.outputFilePath - File path to output file@Deprecated public ActionResult mapCurrentPageThorough(String outputFilePath)
mapCurrentPage method.outputFilePath - The file to save craft class text to.public ActionResult reportBrokenLinksOnCurrentPage()
public ActionResult reportBrokenLinksOnCurrentPage_IncludeAllLinksAlsoNonDisplayedLinks()
public ActionResult waitForElementToAppear(GuiElement guiElement)
guiElement - The element to wait for.public ActionResult waitForElementToAppear(GuiElement guiElement, int timeoutInSeconds)
guiElement - The element to wait fortimeoutInSeconds - Number of seconds to wait for object being displayedpublic org.openqa.selenium.WebElement waitForElementToBeEnabled(GuiElement guiElement, int timeoutInSeconds)
timeoutInSeconds - The number of seconds to wait for the element to become enabled.guiElement - The element to wait forpublic ActionResult waitForElementToDisappear(GuiElement guiElement)
guiElement - The element to wait for disappearance of.public ActionResult waitForElementToDisappear(GuiElement guiElement, int timeoutInSeconds)
guiElement - The element to wait for.timeoutInSeconds - Timeout period to wait for element to disappear.public ActionResult reportBrokenLinksRecursive()
public String getText(GuiElement guiElement)
guiElement - The element to read the current text frompublic String getTextWithoutLogging(GuiElement guiElement)
guiElement - The element to read the current text frompublic boolean exists(GuiElement element)
element - The element to check existence ofpublic ActionResult acceptAlert()
public ActionResult setBrowserWindowSize(int width, int height)
width - The new width of the browser windowheight - The new height of the browser window@Deprecated public ActionResult verifyElementAttribute(GuiElement linkElement, String attributeName, String expectedAttributeValue)
verifiyElement(DomElement) instead.linkElement - The element to check attribute ofattributeName - The name of the attribute to check the value ofexpectedAttributeValue - The expected attribute of the element@Deprecated public ActionResult verifyElementAttributeRegex(GuiElement linkElement, String attributeName, String expectedAttributevalueAsRegex)
verifiyElement(DomElement) instead.linkElement - The element to check attribute ofattributeName - The name of the attribute to check the value ofexpectedAttributevalueAsRegex - The expected attribute of the element, as regular expression patternpublic ActionResult writeRunningProcessListDeviationsSinceTestCaseStart()
public ActionResult write(GuiElement guiElement, String textToWrite)
guiElement - The element to write totextToWrite - The text to writepublic ActionResult writeAfterClear(GuiElement guiElement, String textToWrite)
guiElement - The element to write totextToWrite - The text to writepublic ActionResult submitText(GuiElement guiElement, String text)
guiElement - the elementtext - the text to sendpublic ActionResult saveScreenshot(org.openqa.selenium.WebElement relevantWebElementToMarkWithBorder)
relevantWebElementToMarkWithBorder - relevantWebElementToMarkWithBorderpublic ActionResult saveDesktopScreenshot()
public ActionResult saveDomElementScreenshot(DomElement domElement, String filePath)
domElement - The element to capture an image of.filePath - The file name of the file to write the image to.public boolean existsWithTimeout(GuiElement guiElement, int timeOutInSeconds)
guiElement - The element to check existence oftimeOutInSeconds - The time to wait for object to exist.public boolean exists(DomElement domElement)
domElement - The element to check existence ofpublic ActionResult setStandardTimeout(int standardTimeoutInSeconds)
standardTimeoutInSeconds - The new value for standard timeout, in seconds.public ActionResult clickOnElementWithTheVisibleText(String visibleText)
visibleText - The visible text of the element to findpublic ActionResult clickEvenIfDisabled(GuiElement guiElement, int timeoutInSeconds)
guiElement - the GUI element to clicktimeoutInSeconds - The number of seconds to wait and try to clickpublic ActionResult click(GuiElement guiElement)
guiElement - the GUI element to clickpublic ActionResult click(GuiElement guiElement, int timeoutInSeconds)
guiElement - the GUI element to clicktimeoutInSeconds - The number of seconds to wait and try to clickpublic ActionResult closeBrowser()
public ActionResult makeSureDriverIsClosed()
@Deprecated public void verifyElementExistence(GuiElement guiElement)
verifiyElement(DomElement) instead.guiElement - The GUI element to find@Deprecated public void verifyObjectExistence(GuiElement guiElement)
verifiyElement(DomElement) instead.guiElement - The GUI element to find@Deprecated public void verifyObjectIsNotDisplayed(GuiElement guiElement)
verifiyElement(DomElement) instead.guiElement - The GUI element to find@Deprecated public void verifyElementIsNotDisplayed(GuiElement guiElement)
verifiyElement(DomElement) instead.guiElement - The GUI element to find@Deprecated public void verifyObjectIsNotDisplayedWithTimeout(GuiElement guiElement, int timeoutInSeconds)
verifiyElement(DomElement) instead.guiElement - The GUI element to findtimeoutInSeconds - The time to wait for object disappearance.@Deprecated public void verifyElementIsNotDisplayedWithTimeout(GuiElement guiElement, int timeoutInSeconds)
verifiyElement(DomElement) instead.guiElement - The GUI element to findtimeoutInSeconds - The time to wait for object disappearance.public boolean isDisplayed(GuiElement guiElement)
guiElement - The element to check forpublic boolean isNotDisplayed(GuiElement guiElement)
guiElement - The element to check forpublic boolean isNotDisplayedExactlyNow(GuiElement guiElement)
guiElement - The element to check forpublic boolean isNotDisplayedWithinTimeout(GuiElement guiElement, int timeoutInSeconds)
guiElement - The element to check fortimeoutInSeconds - Seconds to wait for element being disappeared@Deprecated public void verifyObjectIsDisplayed(GuiElement guiElement)
verifiyElement(DomElement) instead.guiElement - The GUI element to find@Deprecated public void verifyElementIsDisplayed(GuiElement guiElement)
verifiyElement(DomElement) instead.verifyObjectExistence(GuiElement), that checks if the element exist in the html.guiElement - The GUI element to find@Deprecated public void verifyObjectDoesNotExist(GuiElement guiElement)
verifiyElement(DomElement) instead.guiElement - The GUI element to find@Deprecated public void verifyElementDoesNotExist(GuiElement guiElement)
verifiyElement(DomElement) instead.guiElement - The GUI element to find@Deprecated public void verifyObjectDoesNotExistWithTimeout(GuiElement guiElement, int timeoutInSeconds)
verifiyElement(DomElement) instead.guiElement - The GUI element to find.timeoutInSeconds - The timeout to wait for object disappearance.@Deprecated public void verifyElementDoesNotExistWithTimeout(GuiElement guiElement, int timeoutInSeconds)
verifiyElement(DomElement) instead.guiElement - The GUI element to find.timeoutInSeconds - The timeout to wait for object disappearance.@Deprecated public void verifyObjectExistenceWithTimeout(GuiElement guiElement, int timeoutInSeconds)
verifiyElement(DomElement) instead (and set the timeout).guiElement - The element to verifytimeoutInSeconds - The number of seconds to keep retrying before calling it a failure@Deprecated public void verifyElementExistenceWithTimeout(GuiElement guiElement, int timeoutInSeconds)
verifiyElement(DomElement) instead.guiElement - The element to verifytimeoutInSeconds - The number of seconds to keep retrying before calling it a failurepublic boolean isDisplayedWithoutTimeout(GuiElement guiElement)
guiElement - The element to check for@Deprecated public void verifyTextExistOnCurrentPage(String text)
verify() instead.text - test string to find@Deprecated public boolean textExistInPageSourceOfCurrentPageWithinTimeout(String text, int timeoutInSeconds)
verify() instead.text - test string to findtimeoutInSeconds - The time to waitpublic boolean textExistOnCurrentPageWithinTimeout(String text, int timeoutInSeconds)
text - test string to findtimeoutInSeconds - The time to waitpublic boolean textIsDisplayedOnCurrentPageWithinTimeout(String text, int timeoutInSeconds)
text - test string to findtimeoutInSeconds - The time to wait@Deprecated public void verifyTextAsRegexPatternExistInPageSource(String textAsRegexPattern)
verify() insteadtextAsRegexPattern - test string to find@Deprecated public void verifyPageTitleAsRegex(String expectedTitleAsRegexPattern)
verify().title() instead.expectedTitleAsRegexPattern - Expected regular expression pattern to match the current title of the web page@Deprecated public void verifyPageTitle(String expectedTitle)
verify().title() instead.expectedTitle - Expected current title of the web page@Deprecated public void verifyPageTitleAsRegexWithTimeout(String expectedTitleAsRegexPattern, int timeoutInSeconds)
verify().title() instead.expectedTitleAsRegexPattern - Expected title pattern in a regular expression format, for the web pagetimeoutInSeconds - Timeout in seconds@Deprecated public void verifyPageTitleWithTimeout(String expectedTitle, int timeoutInSeconds)
verify().title() instead.expectedTitle - Expected title of the web pagetimeoutInSeconds - Timeout in seconds@Deprecated public void verifyElementText(GuiElement guiElement, String expectedText)
verifiyElement(DomElement)} insteadguiElement - The element to check the text ofexpectedText - The expected text to find@Deprecated public void verifyElementTextContainsText(GuiElement guiElement, String expectedText)
verifiyElement(DomElement)} insteadguiElement - The element to check the text ofexpectedText - The expected text to find@Deprecated public void verifyElementTextWithRegexPattern(GuiElement guiElement, String expectedTextAsRegexPattern)
verifiyElement(DomElement)} insteadguiElement - The element to check the text ofexpectedTextAsRegexPattern - The expected text to findpublic ActionResult pickTableRow(GuiElement guiTableElement, String[] textsToFindOnRow)
guiTableElement - The table element in the guitextsToFindOnRow - the text strings to find@Deprecated public ActionResult verifyCurrentPageSourceWithW3validator(boolean verbose)
verify() insteadverbose - If set to true warning messages will be logged, as well as extra debugging information from the W3C validation service. If set to false only errors will be logged.@Deprecated public void verifyIsEnabled(GuiElement guiElement)
verifiyElement(DomElement)} insteadguiElement - The element to assess.public ActionResult switchBrowserTabWithTabNameGivenAsRegexPattern(String tabNameAsRegexForTabToSwitchTo)
tabNameAsRegexForTabToSwitchTo - The name of the tab to switch to.public ActionResult switchBrowserTab(String tabNameForTabToSwitchTo)
tabNameForTabToSwitchTo - The name of the tab to switch to.public ActionResult closeCurrentBrowserTab()
public ActionResult hover(GuiElement guiElement)
guiElement - Element to hoverpublic ElementVerificationMethods verifiyElement(DomElement domElement)
public boolean isEnabled(GuiElement guiElement)
guiElement - The element to checkpublic ActionResult selectInMultipleChoiceDropdown(GuiElement dropdownElement, ArrayList<String> selectedOptions)
dropdownElement - The element to interact withselectedOptions - The list of options to select, based on visible textpublic ActionResult selectInDropdown(GuiElement guiElement, String selection)
guiElement - The element to interact withselection - The visible text of the option to choosepublic ActionResult chooseRadioButton(GuiElement radioButtonContainer, String text)
radioButtonContainer - The element to interact withtext - The visible text of the element to choosepublic ActionResult manageCheckbox(GuiElement checkboxElement, Boolean expectedToBeTicked)
checkboxElement - The element to interact withexpectedToBeTicked - True if expected to be ticked after procedure, false if expected to be un-ticked after procedure. If null is provided, execution will proceed without interaction.public String getSelectedValueFromDropdown(GuiElement guiElement)
@Deprecated public void verifyImage(GuiElement guiElement, String pathToOracleImage)
guiElement - The image to checkpathToOracleImage - The oracle image to compare with@Deprecated public void verifyTableRows(GuiElement guiElement, String[] headlineColonValueSemicolonSeparatedString, CellMatchingType cellMatchingType)
verifiyElement(DomElement)} insteadguiElement - The table to searchheadlineColonValueSemicolonSeparatedString - The data to find, in the pattern example of 'Headline1:ExpectedCorrespondingCellValue1;Headline2:ExpectedCorrespondingCellValue2'. If all values can be matched on the same row the test is passed.cellMatchingType - Type of matching performed.@Deprecated public void verifyTableRow(GuiElement tableElement, String headlineColonValueSemicolonSeparatedString, CellMatchingType cellMatchingType)
verifiyElement(DomElement)} insteadtableElement - The table element.headlineColonValueSemicolonSeparatedString - The data to find, in the pattern example of 'Headline1:ExpectedCorrespondingCellValue1;Headline2:ExpectedCorrespondingCellValue2'. If all values can be matched on the same row the test is passed.cellMatchingType - Type of matching performed.public ActionResult reloadPage()
@Deprecated public void verifyTableHeadline(GuiElement tableElement, String expectedHeadline)
verifiyElement(DomElement)} insteadtableElement - Table elementexpectedHeadline - Headline name, as seen in the tablepublic TableData tableDataFromGuiElement(GuiElement guiElement, boolean logErrors)
public boolean tableRowExists(GuiElement tableElement, String headlineColonValueSemicolonSeparatedString, boolean regex)
tableElement - The table elementheadlineColonValueSemicolonSeparatedString - The pattern to find ('Headline1:CorrespondingDataValueOnRow;Headline2:CorrespondingDataValueForThisHeadline').regex - True if data value pattern is states as a regular expressions. Otherwise a check for cells containing the data value is performed.public boolean tableRowExists(GuiElement tableElement, String headlineColonValueSemicolonSeparatedString, CellMatchingType cellMatchingType)
tableElement - The table elementheadlineColonValueSemicolonSeparatedString - The pattern to find ('Headline1:CorrespondingDataValueOnRow;Headline2:CorrespondingDataValueForThisHeadline').cellMatchingType - Type of matching performed.public boolean tableRowExistsWithTimeout(GuiElement tableElement, String headlineColonValueSemicolonSeparatedString, CellMatchingType cellMatchingType)
tableElement - The table elementheadlineColonValueSemicolonSeparatedString - The pattern to find ('Headline1:CorrespondingDataValueOnRow;Headline2:CorrespondingDataValueForThisHeadline').cellMatchingType - Type of matching performed.@Deprecated public void verifyTableHeadlines(GuiElement tableElement, List<String> expectedHeadlines)
verifiyElement(DomElement)} insteadtableElement - The table elementexpectedHeadlines - The list of expected headlinespublic boolean tableIsEmpty(GuiElement tableElement)
tableElement - The table element.public ActionResult saveHtmlContentOfCurrentPage()
public void haltFurtherExecution()
public org.openqa.selenium.WebElement getRuntimeElementWithoutLogging(DomElement element)
element - Declared DomElement to interact withpublic org.openqa.selenium.WebElement getRuntimeElementWithoutLogging(DomElement parent, DomElement descendantToReturn)
parent - The DomElement limiting search scope. Only the descendants of this element will be searched.descendantToReturn - The DomElement being sought after.public org.openqa.selenium.WebElement getRuntimeElementWithTimeout(DomElement element, int timeoutInSeconds)
element - Declared DomElement to interact withtimeoutInSeconds - Number of seconds to wait for element before giving up on itpublic boolean pageTitleExistWithTimeout(String expectedPageTitle, int timeoutInSeconds)
public boolean pageTitleMatchRegexWithTimeout(String expectedPageTitleRegEx, int timeoutInSeconds)
@Deprecated public void verifyBrowserConsoleHasNoErrors_AlsoClearsBrowserConsole()
verify()} insteadpublic void logOutputFromBrowserConsole_AlsoClearsBrowserConsole()
public List<org.openqa.selenium.logging.LogEntry> getLogEntriesFromBrowser(Level lowestLogLevel)
public boolean waitForElementToFinishAnimation(GuiElement guiElement)
guiElement - The element to wait forpublic boolean waitForElementToFinishAnimation(DomElement domElement, int timeoutInSeconds)
domElement - The element to wait fortimeoutInSeconds - How long to wait for the element to stop animate@Deprecated public void verifyElementIsAnimated(DomElement domElement, int timeoutInSeconds)
verifiyElement(DomElement)} insteaddomElement - timeoutInSeconds - protected boolean bufferedImagesAreEqual(BufferedImage img1, BufferedImage img2)
protected BufferedImage grabElementImage(DomElement domElement)
public Integer getRuntimeElementMatchCount(DomElement domElement)
Copyright © 2019. All rights reserved.