Class SmartClientWebDriver
- All Implemented Interfaces:
- org.openqa.selenium.interactions.HasInputDevices,- org.openqa.selenium.interactions.Interactive,- org.openqa.selenium.JavascriptExecutor,- org.openqa.selenium.SearchContext,- org.openqa.selenium.TakesScreenshot,- org.openqa.selenium.WebDriver
- Direct Known Subclasses:
- SmartClientChromeDriver,- SmartClientEdgeDriver,- SmartClientFirefoxDriver,- SmartClientIEDriver,- SmartClientRemoteWebDriver
WebDriver interface providing SmartClient specific enhancements. Additionally several extra methods are provided to correspond one to one with classic Selenium's "Selenese" test language. This, in combination with SeleneseRunner allows the running of Selenese test files with WebDriver.-  Method SummaryModifier and TypeMethodDescriptionbooleanassertEval(String javaScript) Assert that the specified JavaScript script evaluates to empty String or null.booleanassertEval(String javaScript, Object expected) Assert that the specified JavaScript script evaluates equal to the expected value.booleanassertEval(String javaScript, Object expected, boolean asJavaScriptString) Assert that the specified JavaScript script evaluates equal to the expected value.booleanassertEval(String javaScript, String expected) Assert that the specified JavaScript script evaluates equal to the expected value.booleanassertEval(String javaScript, String expected, boolean asJavaScriptString) Assert that the specified JavaScript script evaluates equal to the expected value.blur(org.openqa.selenium.By by) Blurs the target element or canvas.clearCanvasProperty(org.openqa.selenium.By scLocator, String propertyName) Clears the specified canvas property by setting itnull.voidResets all tolerances to their default values.click(org.openqa.selenium.By by) Send a single click to the locator target.clickAndHold(org.openqa.selenium.By by) Equivalent of our "mouseDown", sent to locator target.clickAndHoldAt(org.openqa.selenium.By by, int xOffset, int yOffset) Equivalent of our "mouseDown", sent to an offset from locator target's left, top corner.contextClick(org.openqa.selenium.By by) Send a context (right) click to the locator target.To Support Selenese.To Support Selenese.doubleClick(org.openqa.selenium.By by) Send a double click to the locator target.dragAndDrop(org.openqa.selenium.By sourceBy, String offset) Deprecated.use the variant that takes separate coordinate offsetsdragAndDrop(org.openqa.selenium.By sourceBy, org.openqa.selenium.By targetBy) Simulate a drag-and-drop from the source locator to the target locator.dragAndDropBy(org.openqa.selenium.By sourceBy, int xOffset, int yOffset) Simulate a drag-and-drop from the source locator by the horizontal and vertical offsets.focus(org.openqa.selenium.By by) Set focus into the target element or canvas.focus(org.openqa.selenium.By by, boolean clearModifiers) Set focus into the target element or canvas.focus(org.openqa.selenium.By by, boolean clearModifiers, boolean refocus) Set focus into the target element or canvas.voidFetch a URL relative to the baseURL.voidFetch a URL relative to the baseURL.intgetElementHeight(org.openqa.selenium.By by) Get height of target elementintgetElementPositionLeft(org.openqa.selenium.By by) Get left page offset of target elementintgetElementPositionTop(org.openqa.selenium.By by) Get top page offset of target elementintgetElementWidth(org.openqa.selenium.By by) Get width of target elementSimulate Selenium V1's getEval() by evaluating the expression passed in as a series of statements, and returning the value of the last statement as the result.Simulate Selenium V1's getEval() by evaluating the expression passed in as a series of statements, and returning the value of the last statement as the result.getTable(org.openqa.selenium.By scLocator, long row, long col) Returns the specified table cell display value.getText(org.openqa.selenium.By by) Returns text of element associated with locator, or the value if there's no associated text.getValue(org.openqa.selenium.By scLocator) Returns value of element associated with locator.getValueAsString(org.openqa.selenium.By scLocator) Similar togetValue(By)except always returns the value as a String.getValueAsString(org.openqa.selenium.By scLocator, boolean asJavaScriptString) Similar togetValue(By)except always returns the value as a String.Send a modifer key down event to the locator target.keyDown(org.openqa.selenium.By by, org.openqa.selenium.Keys theKey) Send a modifer key down event to the locator target.Sends a single keystroke to the target.Similar tosendKeys(org.openqa.selenium.By, java.lang.String)to support Selenese conversion.Send a modifer key up event to the locator target.keyUp(org.openqa.selenium.By by, org.openqa.selenium.Keys theKey) Send a modifer key up event to the locator target.mouseMove(org.openqa.selenium.By by) Simulate a mouseOver for the locator target.mouseMoveAt(org.openqa.selenium.By by, int xOffset, int yOffset) Simulate a mouseOver at an offset from locator target's left, top corner.voidpause(long waitInMillis) Wait for the specified amount of time.release(org.openqa.selenium.By by) Equivalent of our "mouseUp", sent to the locator target.releaseAt(org.openqa.selenium.By by, int xOffset, int yOffset) Equivalent of our "mouseUp", sent to an offset from locator target's left, top corner.voidscrollIntoViewIfNeeded(org.openqa.selenium.By by) Scroll the target into view if it's not already in view.booleanscrollIntoViewIfNeeded(org.openqa.selenium.By by, org.openqa.selenium.WebElement element) Scroll the target into view if it's not already in view.secondClick(org.openqa.selenium.By by) Send a second click to the locator target.voidselectWindowByName(String name) Switch to window specified by name.voidselectWindowByTitle(String title) Switch to window specified by title.booleanSimilar totype(org.openqa.selenium.By)except returns whether the element actually got cleared before the new value was typed, and sends a Keys.TAB to the target after typing the value.Send a sequence of keys to the locator target.voidsetAllowCoordClickOnOccludingElement(boolean allow) voidsetAllowJavaScriptToStringMatch(boolean allowJSMatch) Configures whetherSmartClientWebDriverchecks for a JavaScript match when comparing Strings to values, in addition to performing the check against a Java conversion of the value.voidsetBaseUrl(String baseUrl) Set the Base URL against which tests will runvoidsetCanvasHeightTolerance(long canvasHeightTolerance) Sets primary tolerance forverifyCanvasHeight(org.openqa.selenium.By, long).setCanvasProperty(org.openqa.selenium.By scLocator, String propertyName, Object value) Sets the specified canvas property to the provided value.setCanvasPropertyFalse(org.openqa.selenium.By scLocator, String propertyName) Sets the specified canvas propertyfalse.setCanvasPropertyTrue(org.openqa.selenium.By scLocator, String propertyName) Sets the specified canvas propertytrue.voidsetCanvasWidthTolerance(long canvasWidthTolerance) Sets primary tolerance forverifyCanvasWidth(org.openqa.selenium.By, long).voidsetClientLogLevel(String category, long level) Sets client log level for a category as number.voidsetClientLogLevel(String category, String level) Sets client log level for a category using log priority name.voidsetDefaultImplicitWait(long implicitWaitMillis) Change the implicit timeout for native WebDriver calls to the supplied number of milliseconds.voidsetDefaultWaitTimeout(long timeoutInSeconds) Change the default timeout for SmartClientWebDriver waitForXXX() methods to the supplied number of seconds.voidsetElementTolerance(long elementTolerance) voidsetMaxDragPause(long maxDragPauseMillis) Change the default maximum pause used by ScActions during dragAndDrop operations.voidsetOccludedElementApproach(com.isomorphic.webdriver.SmartClientWebDriver.OccludedElementApproach occludedApproach) How to click on an occludedWebElementthat can't be hit by clicking at the expected coordinates.voidsetServerLogLevel(String category, String level) Sets server log level for a category using log priority name.voidsetUseFrameworkValueAsFallback(boolean useFrameworkValue) Sets whethergetValue(org.openqa.selenium.By)should be called on locators as a fallback ifgetText(org.openqa.selenium.By)is not able to find anything (other than the empty string).voidsetValueTolerance(long valueTolerance) Sets value tolerance forverifyValueWithTolerance(org.openqa.selenium.By, java.lang.Long), and fallback tolerance values forverifyCanvasWidth(org.openqa.selenium.By, long)andverifyCanvasHeight(org.openqa.selenium.By, long).To Support Selenese.To Support Selenese.voidShow the developer console.type(org.openqa.selenium.By by) Sends an empty String to the target, clearing it if it's an editable text element.Alternative tosendKeys(By,String)taking a single key as a Long.Clears target if it's an editable text element.booleanverifyCanvasHeight(org.openqa.selenium.By scLocator, long expectedHeight) Verify height of target canvas.booleanverifyCanvasWidth(org.openqa.selenium.By scLocator, long expectedWidth) Verify width of target canvas.booleanverifyElementClickable(org.openqa.selenium.By scLocator) Verify that a given element is clickable.booleanverifyElementHeight(org.openqa.selenium.By by, long expectedHeight) Verify that target element height matches expected valuebooleanverifyElementHeightWithTolerance(org.openqa.selenium.By by, long expectedHeight) Verify that target element height matches expected value within tolerance.booleanverifyElementPositionLeft(org.openqa.selenium.By by, long expectedLeft) Verify that target element left page offset matches expected valuebooleanverifyElementPositionTop(org.openqa.selenium.By by, long expectedTop) Verify that target element top page offset matches expected valuebooleanverifyElementPresent(org.openqa.selenium.By by) Verify that a given element is present.booleanverifyElementReadyForKeyPresses(org.openqa.selenium.By scLocator) Verify that a given element is ready to receive keypresses.booleanverifyElementSelected(org.openqa.selenium.By by) Verify that a given element is selected.booleanverifyElementVisible(org.openqa.selenium.By by) Verify that a given element is visible.booleanverifyElementWidth(org.openqa.selenium.By by, long expectedWidth) Verify that target element width matches expected valuebooleanverifyElementWidthWithTolerance(org.openqa.selenium.By by, long expectedWidth) Verify that target element width matches expected value within tolerance.booleanverifyTable(org.openqa.selenium.By scLocator, long row, long col, String expected) Verify that specified table cell display value matches the expected String pattern.booleanverifyText(org.openqa.selenium.By by) Verify that the element's text is empty.booleanverifyText(org.openqa.selenium.By by, String expected) Verify that the supplied String pattern matches the element's text.booleanverifyTextPresent(String expected) Verify that the supplied String pattern is presnt somewhere on the page.booleanverifyTextPresent(org.openqa.selenium.By by, String expected) Verify that the supplied String pattern is contained in the element's text.booleanverifyTitle(String expected) Verify that the supplied String pattern matches the page title.booleanverifyValue(org.openqa.selenium.By scLocator, Boolean expected) Verifies that the target has theBooleanvalue expected.booleanverifyValue(org.openqa.selenium.By scLocator, Integer expected) Verifies that the target has theIntegervalue expected.booleanverifyValue(org.openqa.selenium.By scLocator, Long expected) Verifies that the target has theLongvalue expected.booleanverifyValue(org.openqa.selenium.By scLocator, String expected) Verifies that the target matches theStringpattern.booleanverifyValueEmpty(org.openqa.selenium.By scLocator) Verifies that target's value is empty.booleanverifyValueWithTolerance(org.openqa.selenium.By scLocator, Integer expected) Verifies that the target has theIntegervalue expected within tolerance.booleanverifyValueWithTolerance(org.openqa.selenium.By scLocator, Long expected) Verifies that the target has theLongvalue expected within tolerance.booleanverifyValueWithTolerance(org.openqa.selenium.By scLocator, String expected) Verifies that the target matches theStringpattern, with any numbers allowed to match literal numbers in the expected String with a tolerance.booleanwaitForCanvasDone(org.openqa.selenium.By scLocator) Wait until a targetCanvasresponds positively to the isCanvasDone() call.booleanwaitForCanvasDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetCanvasresponds positively to the isCanvasDone() call.booleanwaitForCondition(String javaScript) Wait for a javascript expression to evaluate to true.booleanwaitForCondition(String javaScript, long timeoutInSeconds) Wait for a javascript expression to evaluate to true.booleanwaitForCondition(String javaScript, long timeoutInSeconds, Object... argument) Wait for a javascript script to execute and return true.booleanwaitForElementClickable(org.openqa.selenium.By scLocator) Wait until a given element responds positively to the isElementClickable() call.booleanwaitForElementClickable(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element responds positively to the isElementClickable() call.booleanwaitForElementInViewport(org.openqa.selenium.By scLocator) Wait until a given element has been scrolled into the browser viewport.booleanwaitForElementInViewport(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element has been scrolled into the browser viewport.booleanwaitForElementNotClickable(org.openqa.selenium.By scLocator) Wait until a given element responds negatively to the isElementClickable() call.booleanwaitForElementNotClickable(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element responds negatively to the isElementClickable() call.booleanwaitForElementNotPresent(org.openqa.selenium.By by) Wait until a given element is no longer present.booleanwaitForElementNotPresent(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element is no longer present.booleanwaitForElementNotVisible(org.openqa.selenium.By by) Wait until a given element is no longer visible.booleanwaitForElementNotVisible(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element is no longer visible.booleanwaitForElementPresent(org.openqa.selenium.By by) Wait until a given element is present.booleanwaitForElementPresent(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element is present.booleanwaitForElementReadyForKeyPresses(org.openqa.selenium.By scLocator) Wait until a given element responds positively to the isElementReadyForKeyPresses() call.booleanwaitForElementReadyForKeyPresses(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element responds positively to the isElementReadyForKeyPresses() call.booleanwaitForElementVisible(org.openqa.selenium.By by) Wait until a given element becomes visible.booleanwaitForElementVisible(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element becomes visible.booleanwaitForEval(String javaScript, String expected) Wait for a javascript expression to evaluate to a value that matches the supplied String pattern under the rules described inverifyValue(org.openqa.selenium.By, java.lang.Boolean).booleanwaitForEval(String javaScript, String expected, long timeoutInSeconds) Wait for a javascript expression to evaluate to a value that matches the supplied String pattern under the rules described inverifyValue(org.openqa.selenium.By, java.lang.Boolean).booleanwaitForFormDone(org.openqa.selenium.By scLocator) Wait until a targetDynamicFormresponds positively to the isFormDone() call.booleanwaitForFormDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetDynamicFormresponds positively to the isFormDone() call.booleanwaitForFrameToLoad(String frameLocator, long timeoutInSeconds) Wait until a frame has loaded.booleanwaitForGridDone(org.openqa.selenium.By scLocator) Wait until a targetListGridresponds positively to the isGridDone() call.booleanwaitForGridDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetListGridresponds positively to the isGridDone() call.booleanwaitForGridDone(org.openqa.selenium.By scLocator, Boolean includeEdits) Wait until a targetListGridresponds positively to the isGridDone() call.booleanwaitForGridDone(org.openqa.selenium.By scLocator, Boolean includeEdits, long timeoutInSeconds) booleanwaitForHoverTextPresent(String expected) Wait until the hover canvas shows a particular text value.booleanwaitForHoverTextPresent(String expected, long timeoutInSeconds) Wait until the hover canvas shows a particular text value.booleanwaitForItemDone(org.openqa.selenium.By scLocator) Wait until a targetFormItemresponds positively to the isItemDone() call.booleanwaitForItemDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetFormItemresponds positively to the isItemDone() call.booleanWait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(long timeoutInSeconds) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(com.isomorphic.webdriver.SystemDoneConfig config) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(com.isomorphic.webdriver.SystemDoneConfig config, long timeoutInSeconds) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(Boolean includeRedraws) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(Boolean includeRedraws, Boolean includeEdits) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(Boolean includeRedraws, Boolean includeEdits, long timeoutInSeconds) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(String includePropList) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForSystemDone(String includePropList, long timeoutInSeconds) Wait until a given element responds positively to the isSystemDone() call.booleanwaitForText(org.openqa.selenium.By by, String expected) Wait until a given element has a particular text value.booleanwaitForText(org.openqa.selenium.By by, String expected, long timeoutInSeconds) Wait until a given element has a particular text value.booleanwaitForTileGridDone(org.openqa.selenium.By scLocator) Wait until a targetTileGridresponds positively to the isTileGridDone() call.booleanwaitForTileGridDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetTileGridresponds positively to the isTileGridDone() call.booleanwaitForTileLayoutDone(org.openqa.selenium.By scLocator) Wait until a targetTileLayoutresponds positively to the isTileLayoutDone() call.booleanwaitForTileLayoutDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetTileLayoutresponds positively to the isTileLayoutDone() call.booleanwaitForValue(org.openqa.selenium.By scLocator, Object expected) Wait until a target matches theStringpattern.booleanwaitForValue(org.openqa.selenium.By scLocator, Object expected, long timeoutInSeconds) Wait until a target matches theStringpattern.
-  Method Details-  setMaxDragPausepublic void setMaxDragPause(long maxDragPauseMillis) Change the default maximum pause used by ScActions during dragAndDrop operations. Too little and dragAndDrop operations will short-stroke. Too much and the mouse won't be released and WebDriver communication with the browser will fail.- Parameters:
- maxDragPauseMillis- new maximum pause for dragAndDrops
 
-  setDefaultWaitTimeoutpublic void setDefaultWaitTimeout(long timeoutInSeconds) Change the default timeout for SmartClientWebDriver waitForXXX() methods to the supplied number of seconds. Does not impact native WebDriver wait timeouts.- Parameters:
- timeoutInSeconds- new default timeout, in seconds (must be positive)
 
-  setDefaultImplicitWaitpublic void setDefaultImplicitWait(long implicitWaitMillis) Change the implicit timeout for native WebDriver calls to the supplied number of milliseconds. For example this will affect non-ByScLocator findElement() waits.- Parameters:
- implicitWaitMillis- new implicit timeout, in milliseconds (must be positive)
 
-  setOccludedElementApproachpublic void setOccludedElementApproach(com.isomorphic.webdriver.SmartClientWebDriver.OccludedElementApproach occludedApproach) How to click on an occludedWebElementthat can't be hit by clicking at the expected coordinates. In older versions of WebDriver, occlusion didn't matter as much, and the element could still be targeted with a click. In Selenium v3, you're not able to click on an element unless if it has visible points and only at those points.The default is that we attempt to click at the element currently at that point if it's a descendant of the originally targeted element. If it's not, a number of points inside the original's element rect are checked for being the element or its descendants, and the closest descendant nearest the center of the rect is selected. Note that the W3C (driver-backed) WebDriver (i.e. not legacy mode) requires SmartClientWebDriver to more aggressively check for occlusion, as clicks on occluded elements may silently fail without any exception thrown in W2C WebDriver. - Parameters:
- occludedApproach- specifies approach to take when click() can't reach the targeted element By coordinates
 
-  setAllowCoordClickOnOccludingElementDeprecated.Configures handling of occludedWebElements. Under WebDriver v3, this method is better avoided in favor ofsetOccludedElementApproach(com.isomorphic.webdriver.SmartClientWebDriver.OccludedElementApproach).- Parameters:
- allow- sets ELEMENT_AT_POINT if true, otherwise ELEMENT strategy
 
-  setValueTolerancepublic void setValueTolerance(long valueTolerance) Sets value tolerance forverifyValueWithTolerance(org.openqa.selenium.By, java.lang.Long), and fallback tolerance values forverifyCanvasWidth(org.openqa.selenium.By, long)andverifyCanvasHeight(org.openqa.selenium.By, long).- Parameters:
- valueTolerance- absolute deviation from expected value to allow, inclusive
 
-  setElementTolerancepublic void setElementTolerance(long elementTolerance) Sets tolerance forverifyElementWidthWithTolerance(org.openqa.selenium.By, long)andverifyElementHeightWithTolerance(org.openqa.selenium.By, long).- Parameters:
- elementTolerance- absolute deviation from expected value to allow, inclusive
 
-  setCanvasWidthTolerancepublic void setCanvasWidthTolerance(long canvasWidthTolerance) Sets primary tolerance forverifyCanvasWidth(org.openqa.selenium.By, long).- Parameters:
- canvasWidthTolerance- absolute deviation from expected value to allow, inclusive
 
-  setCanvasHeightTolerancepublic void setCanvasHeightTolerance(long canvasHeightTolerance) Sets primary tolerance forverifyCanvasHeight(org.openqa.selenium.By, long).- Parameters:
- canvasHeightTolerance- absolute deviation from expected value to allow, inclusive
 
-  clearTolerancespublic void clearTolerances()Resets all tolerances to their default values.
-  getElementWidthpublic int getElementWidth(org.openqa.selenium.By by) Get width of target element- Parameters:
- by- element locator
- Returns:
- width of target element
 
-  getElementHeightpublic int getElementHeight(org.openqa.selenium.By by) Get height of target element- Parameters:
- by- element locator
- Returns:
- height of target element
 
-  getElementPositionLeftpublic int getElementPositionLeft(org.openqa.selenium.By by) Get left page offset of target element- Parameters:
- by- element locator
- Returns:
- left page offset of target element
 
-  getElementPositionToppublic int getElementPositionTop(org.openqa.selenium.By by) Get top page offset of target element- Parameters:
- by- element locator
- Returns:
- top page offset of target element
 
-  getValueReturns value of element associated with locator. Note that due to the underlying JavascriptExecutor rules, a number is always returned as a Long, and in Java num1.equals(num2) will fail even if num1 and num2 represent the same value if num1 is a Long and num2 is an Integer. So you should always compare the result with a Long.In Junit, for example: verifyEquals(driver.getValue(locator), 1234L)- Parameters:
- scLocator- locator to SmartClient target whose value is desired
- Returns:
- element's value
 
-  getValueAsStringSimilar togetValue(By)except always returns the value as a String. Uses JavaScript to perform the conversion. SeegetValueAsString(By, boolean).- Parameters:
- scLocator- locator to SmartClient target whose value is desired
- Returns:
- element's value, as a String
 
-  getValueAsStringSimilar togetValue(By)except always returns the value as a String. IfasJavaScriptStringis true, the string conversion is done in JavaScript by the browser - otherwise it's done ivia Java toString() APIs. Using JavaScript will produce output closer to Selenese v1 scripts.- Parameters:
- scLocator- locator to SmartClient target whose value is desired
- asJavaScriptString- whether to use JavaScript for the toString() conversion
- Returns:
- element's value, as a String
 
-  setUseFrameworkValueAsFallbackpublic void setUseFrameworkValueAsFallback(boolean useFrameworkValue) Sets whethergetValue(org.openqa.selenium.By)should be called on locators as a fallback ifgetText(org.openqa.selenium.By)is not able to find anything (other than the empty string). If not set, the "value" attribute of the WebElement will be used as the fallback instead. This will typically be the "display value" of the element, rather than its "Framework value" (as returned bygetValue(org.openqa.selenium.By)). Default is false.- Parameters:
- useFrameworkValue- whether to use the Framework value as the fallback
 
-  getTextReturns text of element associated with locator, or the value if there's no associated text. (SeesetUseFrameworkValueAsFallback(boolean)for details on what value is used.)See note in verifyText(org.openqa.selenium.By)for how w deal with the fact that WebDriver doesn't convert newlines to spaces in the same way that Selenium v1 did.- Parameters:
- by- element locator
- Returns:
- element's text or values
 
-  getTableReturns the specified table cell display value.- Returns:
- cell's display value
 
-  getEvalSimulate Selenium V1's getEval() by evaluating the expression passed in as a series of statements, and returning the value of the last statement as the result.- Parameters:
- javaScript- statements to evaluate
- Returns:
- value of last statement
 
-  getEvalSimulate Selenium V1's getEval() by evaluating the expression passed in as a series of statements, and returning the value of the last statement as the result.If a fallbackValue expression is provided, the entire series of statements will be wrapped in try/catch logic and the fallbackValue will be returned in the event an exception is hit. - Parameters:
- javaScript- statements to evaluate
- fallbackValue- value if exception hit (must be an expression)
- Returns:
- value of last statement or fallbackValue
 
-  setCanvasPropertyTrueSets the specified canvas propertytrue.- Parameters:
- scLocator- canvas locator
- propertyName- property to set
- Returns:
- the old property value
 
-  setCanvasPropertyFalseSets the specified canvas propertyfalse.- Parameters:
- scLocator- canvas locator
- propertyName- property to set
- Returns:
- the old property value
 
-  clearCanvasPropertyClears the specified canvas property by setting itnull.- Parameters:
- scLocator- canvas locator
- propertyName- property to clear
- Returns:
- the old property value
 
-  setCanvasPropertypublic Object setCanvasProperty(org.openqa.selenium.By scLocator, String propertyName, Object value) Sets the specified canvas property to the provided value.- Parameters:
- scLocator- canvas locator
- propertyName- property to set
- value- new property value
- Returns:
- the old property value
 
-  verifyElementWidthpublic boolean verifyElementWidth(org.openqa.selenium.By by, long expectedWidth) Verify that target element width matches expected value- Parameters:
- by- element locator
- expectedWidth- width to match
- Returns:
- whether target element width matches expected value
 
-  verifyElementHeightpublic boolean verifyElementHeight(org.openqa.selenium.By by, long expectedHeight) Verify that target element height matches expected value- Parameters:
- by- element locator
- expectedHeight- height to match
- Returns:
- whether target element height matches expected value
 
-  verifyElementPositionLeftpublic boolean verifyElementPositionLeft(org.openqa.selenium.By by, long expectedLeft) Verify that target element left page offset matches expected value- Parameters:
- by- element locator
- expectedLeft- left page offset to match
- Returns:
- whether target element left page offset matches expected value
 
-  verifyElementPositionToppublic boolean verifyElementPositionTop(org.openqa.selenium.By by, long expectedTop) Verify that target element top page offset matches expected value- Parameters:
- by- element locator
- expectedTop- top page offset to match
- Returns:
- whether target element top page offset matches expected value
 
-  verifyElementPresentpublic boolean verifyElementPresent(org.openqa.selenium.By by) Verify that a given element is present.- Parameters:
- by- element locator
- Returns:
- whether the element is present
 
-  verifyElementVisiblepublic boolean verifyElementVisible(org.openqa.selenium.By by) Verify that a given element is visible.- Parameters:
- by- element locator
- Returns:
- whether the element is visible
 
-  verifyElementSelectedpublic boolean verifyElementSelected(org.openqa.selenium.By by) Verify that a given element is selected.- Parameters:
- by- element locator
- Returns:
- whether the element is selected
 
-  verifyElementClickablepublic boolean verifyElementClickable(org.openqa.selenium.By scLocator) Verify that a given element is clickable.- Parameters:
- scLocator- element locator
- Returns:
- whether the element is clickable
 
-  verifyElementReadyForKeyPressespublic boolean verifyElementReadyForKeyPresses(org.openqa.selenium.By scLocator) Verify that a given element is ready to receive keypresses.- Parameters:
- scLocator- element locator
- Returns:
- whether the element is ready to receive keypresses.
 
-  verifyCanvasWidthpublic boolean verifyCanvasWidth(org.openqa.selenium.By scLocator, long expectedWidth) Verify width of target canvas.- Parameters:
- scLocator- canvas locator
- expectedWidth- width to match within tolerance
- Returns:
- whether canvas's width meets tolerance
 
-  verifyCanvasHeightpublic boolean verifyCanvasHeight(org.openqa.selenium.By scLocator, long expectedHeight) Verify height of target canvas.- Parameters:
- scLocator- canvas locator
- expectedHeight- height to match within tolerance
- Returns:
- whether canvas's height meets tolerance
 
-  verifyElementWidthWithTolerancepublic boolean verifyElementWidthWithTolerance(org.openqa.selenium.By by, long expectedWidth) Verify that target element width matches expected value within tolerance.- Parameters:
- by- element locator
- expectedWidth- width to match within tolerance
- Returns:
- whether target element width is within tolerance of expected value
 
-  verifyElementHeightWithTolerancepublic boolean verifyElementHeightWithTolerance(org.openqa.selenium.By by, long expectedHeight) Verify that target element height matches expected value within tolerance.- Parameters:
- by- element locator
- expectedHeight- height to match within tolerance
- Returns:
- whether target element height is within tolerance of expected value
 
-  setAllowJavaScriptToStringMatchpublic void setAllowJavaScriptToStringMatch(boolean allowJSMatch) Configures whetherSmartClientWebDriverchecks for a JavaScript match when comparing Strings to values, in addition to performing the check against a Java conversion of the value. Default is true.- Parameters:
- allowJSMatch- whether to check for a JavaScript toString() match too
 
-  verifyValueEmptypublic boolean verifyValueEmpty(org.openqa.selenium.By scLocator) Verifies that target's value is empty. Note that bothnulland the empty String are considered empty, since by convention Selenium v1's verifyEmptyValue() returns true if no element can be found for the locator - and in that casegetValue(org.openqa.selenium.By)returns null. An emptyListis also considered an empty value ifallowCoordClickOnOccludingElementis true.- Parameters:
- scLocator- locator to SmartClient target to check
- Returns:
- whether value is empty
 
-  verifyValueVerifies that the target has theBooleanvalue expected.- Parameters:
- scLocator- locator to SmartClient target to check
- expected- Boolean to match
- Returns:
- whether value matches expected Boolean
 
-  verifyValueVerifies that the target has theLongvalue expected.- Parameters:
- scLocator- locator to SmartClient target to check
- expected- Long to match
- Returns:
- whether value matches expected Long
 
-  verifyValueWithToleranceVerifies that the target has theLongvalue expected within tolerance.- Parameters:
- scLocator- locator to SmartClient target to check
- expected- Long to match
- Returns:
- whether value matches expected Long within tolerance
 
-  verifyValueVerifies that the target has theIntegervalue expected. Utility method to avoid type casting from Java.- Parameters:
- scLocator- locator to SmartClient target to check
- expected- Integer to match
- Returns:
- whether value matches expected Integer
 
-  verifyValueWithToleranceVerifies that the target has theIntegervalue expected within tolerance.- Parameters:
- scLocator- locator to SmartClient target to check
- expected- Integer to match
- Returns:
- whether value matches expected Integer within tolerance
 
-  verifyValueVerifies that the target matches theStringpattern. Note that the expected String pattern may start with the Selenium v1 specifiers "regex:", "regexp:", "regexi:", "regexpi:", "glob:", and "exact:". As in Selenium v1, "glob:" is the default if no specifier prefix is present, meaning to use globbing.- Parameters:
- scLocator- locator to SmartClient target to check
- expected- pattern value is expected to match
- Returns:
- whether value matches expected String pattern
 
-  verifyValueWithToleranceVerifies that the target matches theStringpattern, with any numbers allowed to match literal numbers in the expected String with a tolerance. So for example, an expected String of "10, 20" will match a JavaScript array value of [12, 19] if avalueToleranceof 10 is in use andJavaScript String matching modeis active.Note that the expected String pattern may start with the Selenium v1 specifiers "regex:", "regexp:", "regexi:", "regexpi:", "glob:", and "exact:". As in Selenium v1, "glob:" is the default if no specifier prefix is present, meaning to use globbing. - Parameters:
- scLocator- locator to SmartClient target to check
- expected- numbers to match with a tolerance, or String matching pattern
- Returns:
- whether value matches expected String pattern
 
-  verifyTextPresentVerify that the supplied String pattern is presnt somewhere on the page.- Parameters:
- expected- String pattern to match against text on page
- Returns:
- whether pattern is presnt somewhere on the page.
 
-  verifyTextpublic boolean verifyText(org.openqa.selenium.By by) Verify that the element's text is empty.- Parameters:
- by- element locator
- Returns:
- whether element's text is empty.
 
-  verifyTextVerify that the supplied String pattern matches the element's text. Note that WebDriver doesn't convert newlines to spaces in the same way as Selenium v1, so to avoid scripts failing when run against this API, we by default allow any spaces in the pattern to match any whitespace in the text.- Parameters:
- by- element locator
- expected- String pattern to match against the element's text.
- Returns:
- whether pattern matches the target's text.
 
-  verifyTextPresentVerify that the supplied String pattern is contained in the element's text. Note that WebDriver doesn't convert newlines to spaces in the same way as Selenium v1, so to avoid scripts failing when run against this API, we by default allow any spaces in the pattern to match any whitespace in the text.- Parameters:
- by- element locator
- expected- String pattern that should be contained by the element's text.
- Returns:
- whether pattern is caonted in the target's text.
 
-  verifyTitleVerify that the supplied String pattern matches the page title. Note that WebDriver doesn't convert newlines to spaces in the same way as Selenium v1, so to avoid scripts failing when run against this API, we by default allow any spaces in the pattern to match any whitespace in the text.- Parameters:
- expected- String pattern to match against the page title.
- Returns:
- whether pattern matches the title text.
 
-  verifyTableVerify that specified table cell display value matches the expected String pattern. Whitespace at either end is ignored and the Selenium v1 matching prefixes mentioned inverifyValue(By,String)are supported.- Parameters:
- scLocator- cell locator
- row- target cell row
- col- target cell col
- expected- String pattern to match against the cell display value
- Returns:
- whether pattern matches the cell display value
 
-  assertEvalAssert that the specified JavaScript script evaluates to empty String or null. SeeassertEval(String,String,boolean).- Parameters:
- javaScript- script to run
- Returns:
- true if script evaluates to empty String or null, else false
 
-  assertEvalAssert that the specified JavaScript script evaluates equal to the expected value. SeeassertEval(String,String,boolean).- Parameters:
- javaScript- script to run
- expected- pattern to match against value of script
- Returns:
- true if script evaluates to true, else false
 
-  assertEvalAssert that the specified JavaScript script evaluates equal to the expected value. SeeassertEval(String,String,boolean).- Parameters:
- javaScript- script to run
- expected- pattern to match against value of script
- asJavaScriptString- whether to convert the result to a String in JavaScript before returning to Java; (e.g. [1,2] will become "1,2")
- Returns:
- true if script evaluates to true, else false
 
-  assertEvalAssert that the specified JavaScript script evaluates equal to the expected value. SeeassertEval(String,String,boolean).- Parameters:
- javaScript- script to run
- expected- pattern to match against value of script
- Returns:
- true if script evaluates to true, else false
 
-  assertEvalAssert that the specified JavaScript script evaluates equal to the expected value. Note that the script is expected to be a sequence of statements ending in an expression taken as the script's value. It should not contain any return statement as you need inexecuteScript(java.lang.String, java.lang.Object...). (This is for back compatibility with Selenium v1.)Note that assertEvalis similar towaitForEval(java.lang.String, java.lang.String)except that the comparison is made immediately and no waiting ever occurs.- Parameters:
- javaScript- script to run
- expected- pattern to match against value of script
- asJavaScriptString- whether to convert the result to a String in JavaScript before returning to Java; (e.g. [1,2] will become "1,2")
- Returns:
- true if script evaluates to true, else false
 
-  waitForElementClickablepublic boolean waitForElementClickable(org.openqa.selenium.By scLocator) Wait until a given element responds positively to the isElementClickable() call.- Parameters:
- scLocator- element locator
- Returns:
- True if the element responded positively in time. False if timed out while trying
- See Also:
 
-  waitForElementClickablepublic boolean waitForElementClickable(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element responds positively to the isElementClickable() call.- Parameters:
- scLocator- element locator
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForElementNotClickablepublic boolean waitForElementNotClickable(org.openqa.selenium.By scLocator) Wait until a given element responds negatively to the isElementClickable() call.- Parameters:
- scLocator- element locator
- Returns:
- True if the element responded negatively in time. False if timed out while trying
- See Also:
 
-  waitForElementNotClickablepublic boolean waitForElementNotClickable(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element responds negatively to the isElementClickable() call.- Parameters:
- scLocator- element locator
- timeoutInSeconds- seconds to wait (ignored if non-negative - default used)
- Returns:
- True if the element responded negatively in time. False if timed out while trying
 
-  waitForElementVisiblepublic boolean waitForElementVisible(org.openqa.selenium.By by) Wait until a given element becomes visible.- Parameters:
- by- element locator
- Returns:
- True if the element becomes visible time. False if timed out while checking
- See Also:
 
-  waitForElementVisiblepublic boolean waitForElementVisible(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element becomes visible.- Parameters:
- by- element locator
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element becomes visible time. False if timed out while checking
 
-  waitForElementPresentpublic boolean waitForElementPresent(org.openqa.selenium.By by) Wait until a given element is present.- Parameters:
- by- target element
- Returns:
- True if the element is present in time. False if timed out while trying
 
-  waitForElementPresentpublic boolean waitForElementPresent(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element is present.- Parameters:
- by- target element
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element is present in time. False if timed out while trying
 
-  waitForElementNotPresentpublic boolean waitForElementNotPresent(org.openqa.selenium.By by) Wait until a given element is no longer present.- Parameters:
- by- target element
- Returns:
- True if the element is not present in time. False if timed out while trying
 
-  waitForElementNotPresentpublic boolean waitForElementNotPresent(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element is no longer present.- Parameters:
- by- target element
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element is not present in time. False if timed out while trying
 
-  waitForElementNotVisiblepublic boolean waitForElementNotVisible(org.openqa.selenium.By by) Wait until a given element is no longer visible.- Parameters:
- by- element locator
- Returns:
- True if the element becomes not visible time. False if timed out while checking
- See Also:
 
-  waitForElementNotVisiblepublic boolean waitForElementNotVisible(org.openqa.selenium.By by, long timeoutInSeconds) Wait until a given element is no longer visible.- Parameters:
- by- element locator
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element becomes not visible time. False if timed out while checking
 
-  waitForElementReadyForKeyPressespublic boolean waitForElementReadyForKeyPresses(org.openqa.selenium.By scLocator) Wait until a given element responds positively to the isElementReadyForKeyPresses() call.- Parameters:
- scLocator- target element
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForElementReadyForKeyPressespublic boolean waitForElementReadyForKeyPresses(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element responds positively to the isElementReadyForKeyPresses() call.- Parameters:
- scLocator- target element
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForElementInViewportpublic boolean waitForElementInViewport(org.openqa.selenium.By scLocator) Wait until a given element has been scrolled into the browser viewport.- Parameters:
- scLocator- target element
- Returns:
- True if the element is in viewport in time. False if timed out while trying
 
-  waitForElementInViewportpublic boolean waitForElementInViewport(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a given element has been scrolled into the browser viewport.- Parameters:
- scLocator- target element
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element is in viewport in time. False if timed out while trying
 
-  waitForCanvasDonepublic boolean waitForCanvasDone(org.openqa.selenium.By scLocator) Wait until a targetCanvasresponds positively to the isCanvasDone() call.- Parameters:
- scLocator- target canvas
- Returns:
- True if the canvas responded positively in time. False if timed out while trying
 
-  waitForCanvasDonepublic boolean waitForCanvasDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetCanvasresponds positively to the isCanvasDone() call.- Parameters:
- scLocator- target canvas
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the canvas responded positively in time. False if timed out while trying
 
-  waitForGridDonepublic boolean waitForGridDone(org.openqa.selenium.By scLocator) Wait until a targetListGridresponds positively to the isGridDone() call.- Parameters:
- scLocator- target grid
- Returns:
- True if the grid responded positively in time. False if timed out while trying
 
-  waitForGridDonepublic boolean waitForGridDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetListGridresponds positively to the isGridDone() call.- Parameters:
- scLocator- target grid
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the grid responded positively in time. False if timed out while trying
 
-  waitForGridDoneWait until a targetListGridresponds positively to the isGridDone() call.- Parameters:
- scLocator- target grid
- includeEdits- whether to check for pending (unsaved) edits
- Returns:
- True if the grid responded positively in time. False if timed out while trying
 
-  waitForGridDonepublic boolean waitForGridDone(org.openqa.selenium.By scLocator, Boolean includeEdits, long timeoutInSeconds) SeewaitForGridDone(org.openqa.selenium.By). Wait until a targetListGridresponds positively to the isGridDone() call.- Parameters:
- scLocator- target grid
- includeEdits- whether to check for pending (unsaved) edits
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the grid responded positively in time. False if timed out while trying
 
-  waitForTileGridDonepublic boolean waitForTileGridDone(org.openqa.selenium.By scLocator) Wait until a targetTileGridresponds positively to the isTileGridDone() call.- Parameters:
- scLocator- target grid
- Returns:
- True if the grid responded positively in time. False if timed out while trying
 
-  waitForTileGridDonepublic boolean waitForTileGridDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetTileGridresponds positively to the isTileGridDone() call.- Parameters:
- scLocator- target grid
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the grid responded positively in time. False if timed out while trying
 
-  waitForTileLayoutDonepublic boolean waitForTileLayoutDone(org.openqa.selenium.By scLocator) Wait until a targetTileLayoutresponds positively to the isTileLayoutDone() call.- Parameters:
- scLocator- target tileLayout
- Returns:
- True if the tileLayout responded positively in time. False if timed out while trying
 
-  waitForTileLayoutDonepublic boolean waitForTileLayoutDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetTileLayoutresponds positively to the isTileLayoutDone() call.- Parameters:
- scLocator- target tileLayout
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the tileLayout responded positively in time. False if timed out while trying
 
-  waitForFormDonepublic boolean waitForFormDone(org.openqa.selenium.By scLocator) Wait until a targetDynamicFormresponds positively to the isFormDone() call.- Parameters:
- scLocator- target form
- Returns:
- True if the form responded positively in time. False if timed out while trying
 
-  waitForFormDonepublic boolean waitForFormDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetDynamicFormresponds positively to the isFormDone() call.- Parameters:
- scLocator- target form
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the form responded positively in time. False if timed out while trying
 
-  waitForItemDonepublic boolean waitForItemDone(org.openqa.selenium.By scLocator) Wait until a targetFormItemresponds positively to the isItemDone() call.- Parameters:
- scLocator- target item
- Returns:
- True if the item responded positively in time. False if timed out while trying
 
-  waitForItemDonepublic boolean waitForItemDone(org.openqa.selenium.By scLocator, long timeoutInSeconds) Wait until a targetFormItemresponds positively to the isItemDone() call.- Parameters:
- scLocator- target item
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the item responded positively in time. False if timed out while trying
 
-  waitForSystemDonepublic boolean waitForSystemDone()Wait until a given element responds positively to the isSystemDone() call.- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDonepublic boolean waitForSystemDone(long timeoutInSeconds) Wait until a given element responds positively to the isSystemDone() call.- Parameters:
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDoneWait until a given element responds positively to the isSystemDone() call.- Parameters:
- includeRedraws- whether to check for pending redraws
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDoneWait until a given element responds positively to the isSystemDone() call.- Parameters:
- includeRedraws- whether to check for pending redraws
- includeEdits- whether to check for pending (unsaved) edits
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDonepublic boolean waitForSystemDone(Boolean includeRedraws, Boolean includeEdits, long timeoutInSeconds) Wait until a given element responds positively to the isSystemDone() call.- Parameters:
- includeRedraws- whether to check for pending redraws
- includeEdits- whether to check for pending (unsaved) edits
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDoneWait until a given element responds positively to the isSystemDone() call.- Parameters:
- includePropList- controls what to check when looking at whether system is "done" specified as a comma-separated list of properties to include
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDoneWait until a given element responds positively to the isSystemDone() call.- Parameters:
- includePropList- controls what to check when looking at whether system is "done" specified as a comma-separated list of properties to include
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDonepublic boolean waitForSystemDone(com.isomorphic.webdriver.SystemDoneConfig config) Wait until a given element responds positively to the isSystemDone() call.- Parameters:
- config- controls what to check when looking at whether system is "done"
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForSystemDonepublic boolean waitForSystemDone(com.isomorphic.webdriver.SystemDoneConfig config, long timeoutInSeconds) Wait until a given element responds positively to the isSystemDone() call.- Parameters:
- config- controls what to check when looking at whether system is "done"
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForTextWait until a given element has a particular text value. SeeverifyText(org.openqa.selenium.By).- Parameters:
- by- target element
- expected- String pattern to match against the element's text.
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForTextWait until a given element has a particular text value. SeeverifyText(org.openqa.selenium.By).- Parameters:
- by- target element
- expected- String pattern to match against the element's text.
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForHoverTextPresentWait until the hover canvas shows a particular text value. SeeverifyText(org.openqa.selenium.By). SeewaitForHoverTextPresent(String,long).- Parameters:
- expected- String pattern to match against the hover canvas' contents
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForHoverTextPresentWait until the hover canvas shows a particular text value. SeeverifyText(org.openqa.selenium.By). Note that for backward compatibilty, this API assumes the pattern is a regex, but you can override that as specified in the documentation forverifyValue(org.openqa.selenium.By, java.lang.Boolean).- Parameters:
- expected- String pattern to match against the hover canvas' contents
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForValueWait until a target matches theStringpattern. SeeverifyValue(org.openqa.selenium.By, java.lang.Boolean).- Parameters:
- scLocator- locator to SmartClient target to check
- expected- pattern value is expected to match
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForValuepublic boolean waitForValue(org.openqa.selenium.By scLocator, Object expected, long timeoutInSeconds) Wait until a target matches theStringpattern. SeeverifyValue(org.openqa.selenium.By, java.lang.Boolean).- Parameters:
- scLocator- locator to SmartClient target to check
- expected- pattern value is expected to match
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
- Returns:
- True if the element responded positively in time. False if timed out while trying
 
-  waitForConditionWait for a javascript expression to evaluate to true. SeewaitForCondition(String,long).- Parameters:
- javaScript- script to run
 
-  waitForConditionWait for a javascript expression to evaluate to true. Note that for backward compatibility with Selenium v1, any value that satisfies !!value == true in javascript will satisfy the wait. Any JavaScript exception occurring outside outside try/catch blocks during the evaluation will propagate out of this method as a JavascriptException.- Parameters:
- javaScript- script to run
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
 
-  waitForConditionWait for a javascript script to execute and return true. This method accepts a script suitable for direct execution by WebDriver's JavascriptExecutor, so if you don't provide a return statement, it will identically return null and always time out. No conversion is done on the result, so to satisfy the wait, an actual Boolean.TRUE must be returned by the JavascriptExecutor.You may pass one or more arguments to this variant, and they're referenced just as in native calls to the WebDriver JavascriptExecutor (e.g. "arguments[0]"). - Parameters:
- javaScript- script to run
- argument- object to pass as argument to script
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
 
-  waitForEvalWait for a javascript expression to evaluate to a value that matches the supplied String pattern under the rules described inverifyValue(org.openqa.selenium.By, java.lang.Boolean). SeewaitForEval(String,String,long).- Parameters:
- javaScript- script to run
- expected- pattern to match against value of script
 
-  waitForEvalWait for a javascript expression to evaluate to a value that matches the supplied String pattern under the rules described inverifyValue(org.openqa.selenium.By, java.lang.Boolean). Script should be in Selenium v1 format - a sequence of statements, with the last statement being a valid expression. That expression will be the value of the script - the script should contain no return statement.- Parameters:
- javaScript- script to run
- expected- pattern to match against value of script
- timeoutInSeconds- seconds to wait (ignored if non-positive - default used)
 
-  waitForFrameToLoadWait until a frame has loaded.- Parameters:
- frameLocator- locator
- timeoutInSeconds- seconds to wait
- Returns:
- True if the frame loads in time. False if timed out while trying
 
-  setBaseUrlSet the Base URL against which tests will run- Parameters:
- baseUrl- new base URL
 
-  getFetch a URL relative to the baseURL.- Parameters:
- relativeUrl- relative URL
 
-  getFetch a URL relative to the baseURL.- Parameters:
- relativeUrl- relative url
- maximize- whether to maximize window
 
-  pausepublic void pause(long waitInMillis) Wait for the specified amount of time.- Parameters:
- waitInMillis- amount of time, in milliseconds, to wait
 
-  selectWindowByNameSwitch to window specified by name.- Parameters:
- name- name of window to switch to
 
-  selectWindowByTitleSwitch to window specified by title.- Parameters:
- title- title of window to switch to
 
-  scrollIntoViewIfNeededpublic void scrollIntoViewIfNeeded(org.openqa.selenium.By by) Scroll the target into view if it's not already in view. SeescrollIntoViewIfNeeded(By,WebElement).- Parameters:
- by- target locator
 
-  scrollIntoViewIfNeededpublic boolean scrollIntoViewIfNeeded(org.openqa.selenium.By by, org.openqa.selenium.WebElement element) Scroll the target into view if it's not already in view. For non SmartClient locators, this blindly calls scrollIntoView() in JavaScript on the DOM element. For SmartClient locators, we only call that API if it appears the target element is occluded at the locator coords.- Parameters:
- by- target locator
- element- target element (only used in non-ByScLocator case)
- Returns:
- whether scrollIntoView() was called on target element
 
-  clickSend a single click to the locator target.- Parameters:
- by- target element or widget - if null then the previous element
- Returns:
- Itself, in order to allow chaining calls.
 
-  secondClickSend a second click to the locator target.- Parameters:
- by- target element or widget - if null then the previous element
- Returns:
- Itself, in order to allow chaining calls.
 
-  doubleClickSend a double click to the locator target. This is just a convenience method that first callsclick(By)and thensecondClick(By).- Parameters:
- by- target element or widget - if null then the previous element
- Returns:
- Itself, in order to allow chaining calls.
 
-  clickAndHoldEquivalent of our "mouseDown", sent to locator target.- Parameters:
- by- target element or widget - if null then the previous element
- Returns:
- Itself, in order to allow chaining calls.
 
-  clickAndHoldAtEquivalent of our "mouseDown", sent to an offset from locator target's left, top corner.- Parameters:
- by- target element or widget - if null then the previous element
- xOffset- horizontal offset from target's left edge
- yOffset- vertical offset from target's top edge
- Returns:
- Itself, in order to allow chaining calls.
 
-  releaseEquivalent of our "mouseUp", sent to the locator target.- Parameters:
- by- target element or widget - if null then the previous element
- Returns:
- Itself, in order to allow chaining calls.
 
-  releaseAtEquivalent of our "mouseUp", sent to an offset from locator target's left, top corner.- Parameters:
- by- target element or widget - if null then the previous element
- xOffset- horizontal offset from target's left edge
- yOffset- vertical offset from target's top edge
- Returns:
- Itself, in order to allow chaining calls.
 
-  contextClickSend a context (right) click to the locator target.- Parameters:
- by- target element or widget - if null then the previous element
- Returns:
- Itself, in order to allow chaining calls.
 
-  mouseMoveSimulate a mouseOver for the locator target.- Parameters:
- by- target element or widget - if null then the previous element
- Returns:
- Itself, in order to allow chaining calls.
 
-  mouseMoveAtSimulate a mouseOver at an offset from locator target's left, top corner.- Parameters:
- by- target element or widget - if null then the previous element
- xOffset- horizontal offset from target's left edge
- yOffset- vertical offset from target's top edge
- Returns:
- Itself, in order to allow chaining calls.
 
-  dragAndDroppublic SmartClientWebDriver dragAndDrop(org.openqa.selenium.By sourceBy, org.openqa.selenium.By targetBy) Simulate a drag-and-drop from the source locator to the target locator.- Parameters:
- sourceBy- Indicates the element to drag. If null then the previous element.
- targetBy- The destination
- Returns:
- Itself, in order to allow chaining calls.
 
-  dragAndDropDeprecated.use the variant that takes separate coordinate offsetsSimulate a drag-and-drop from the source locator by the encoded String offset. Note that this variant is only for backcompat with Selenium v1. If you're writing new WebDriver tests, you should usedragAndDropBy(By,int,int)instead.- Parameters:
- sourceBy- Indicates the element to drag. If null then the previous element.
- offset- Selenese compatible string arg. Eg: "-70,+0"
- Returns:
- Itself, in order to allow chaining calls.
 
-  dragAndDropBypublic SmartClientWebDriver dragAndDropBy(org.openqa.selenium.By sourceBy, int xOffset, int yOffset) Simulate a drag-and-drop from the source locator by the horizontal and vertical offsets.- Parameters:
- sourceBy- Indicates the element to drag. If null then the previous element.
- Returns:
- Itself, in order to allow chaining calls.
 
-  sendKeysSend a sequence of keys to the locator target.- Parameters:
- by- Indicates the target of keystrokes. If null then the previous element.
- keysToSend- the String of keys to send
- Returns:
- Itself, in order to allow chaining calls.
 
-  typeSends an empty String to the target, clearing it if it's an editable text element. Similar tosendKeys(org.openqa.selenium.By, java.lang.String)to support Selenese conversion.- Parameters:
- by- Indicates the target of keystrokes. If null then the previous element.
- Returns:
- Itself, in order to allow chaining calls.
 
-  typeClears target if it's an editable text element. Regardless then sends it the specified String of keys. Similar tosendKeys(org.openqa.selenium.By, java.lang.String)to support selenese conversion.- Parameters:
- by- Indicates the target of keystrokes. If null then the previous element.
- keysToSend- keys to send
- Returns:
- Itself, in order to allow chaining calls.
 
-  typeAlternative tosendKeys(By,String)taking a single key as a Long.- Parameters:
- by- Indicates the target of keystrokes. If null then the previous element.
- keyToSend- Long to send as text
- Returns:
- Itself, in order to allow chaining calls.
 
-  sendDataSimilar totype(org.openqa.selenium.By)except returns whether the element actually got cleared before the new value was typed, and sends a Keys.TAB to the target after typing the value.- Parameters:
- by- Indicates the target of keystrokes. If null then the previous element.
- keysToSend- keys to send
- Returns:
- whether the element was successfully cleared
 
-  keyPressSends a single keystroke to the target.- Parameters:
- by- target of keystrokes (currently ignored)
- charToSend- Javascript key code for a modifier key
- Returns:
- Itself, in order to allow chaining calls.
 
-  keyPressSimilar tosendKeys(org.openqa.selenium.By, java.lang.String)to support Selenese conversion.- Parameters:
- by- target of keystrokes (currently ignored)
- keysToSend- keys to send
- Returns:
- Itself, in order to allow chaining calls.
 
-  keyDownSend a modifer key down event to the locator target.- Parameters:
- by- target of keystrokes (currently ignored except for ENTER)
- charToSend- Javascript key code for a modifier key
- Returns:
- Itself, in order to allow chaining calls.
 
-  keyUpSend a modifer key up event to the locator target.- Parameters:
- by- target of keystrokes (currently ignored)
- charToSend- Javascript key code for a modifier key
- Returns:
- Itself, in order to allow chaining calls.
 
-  keyDownSend a modifer key down event to the locator target.- Parameters:
- by- Indicates the target of keystrokes. If null then the previous element.
- theKey- modifier key
- Returns:
- Itself, in order to allow chaining calls.
 
-  keyUpSend a modifer key up event to the locator target.- Parameters:
- by- Indicates the target of keystrokes. If null then the previous element.
- theKey- modifier key
- Returns:
- Itself, in order to allow chaining calls.
 
-  shiftKeyDownTo Support Selenese. This causes a keydown on key 16- Returns:
- Itself, in order to allow chaining calls.
 
-  shiftKeyUpTo Support Selenese. This causes a keyup on key 16- Returns:
- Itself, in order to allow chaining calls.
 
-  controlKeyDownTo Support Selenese. This causes a keydown on key 17- Returns:
- Itself, in order to allow chaining calls.
 
-  controlKeyUpTo Support Selenese. This causes a keyup on key 17- Returns:
- Itself, in order to allow chaining calls.
 
-  focusSet focus into the target element or canvas.- Parameters:
- by- focus target
- Returns:
- Itself, in order to allow chaining calls.
 
-  focusSet focus into the target element or canvas.- Parameters:
- by- focus target
- clearModifiers- whether to attempt to clear "stuck" modifier keys
- Returns:
- Itself, in order to allow chaining calls.
 
-  focuspublic SmartClientWebDriver focus(org.openqa.selenium.By by, boolean clearModifiers, boolean refocus) Set focus into the target element or canvas.- Parameters:
- by- focus target
- clearModifiers- whether to attempt to clear "stuck" modifier keys
- refocus- whether to refocus instead of no-oping if focus target already has focus
- Returns:
- Itself, in order to allow chaining calls.
 
-  blurBlurs the target element or canvas.- Parameters:
- by- blur target
- Returns:
- Itself, in order to allow chaining calls.
 
-  showConsolepublic void showConsole()Show the developer console.
-  setClientLogLevelSets client log level for a category as number. Note that ERROR is 2, WARN is 3, INFO is 4, etc.- Parameters:
- category- logging category
- level- numerical logging level to set
 
-  setClientLogLevelSets client log level for a category using log priority name. Note that valid priority names are "FATAL", "ERROR", "WARN", "INFO", and "DEBUG".- Parameters:
- category- logging category
- level- named logging level to set
 
-  setServerLogLevelSets server log level for a category using log priority name. This method will wait for the SmartClient Framework to be loaded so server communication is possible. Note that valid priority names are "FATAL", "ERROR", "WARN", "INFO", and "DEBUG".- Parameters:
- category- logging category
- level- named logging level to set
 
 
-