Class SmartClientWebDriver

java.lang.Object
com.isomorphic.webdriver.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

public abstract class SmartClientWebDriver extends Object implements org.openqa.selenium.WebDriver, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.interactions.HasInputDevices, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.JavascriptExecutor
This is an enhancement of the default 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 Details

    • setMaxDragPause

      public 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
    • setDefaultWaitTimeout

      public 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)
    • setDefaultImplicitWait

      public 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)
    • setOccludedElementApproach

      public void setOccludedElementApproach(com.isomorphic.webdriver.SmartClientWebDriver.OccludedElementApproach occludedApproach)
      How to click on an occluded WebElement that 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
    • setAllowCoordClickOnOccludingElement

      @Deprecated public void setAllowCoordClickOnOccludingElement(boolean allow)
      Configures handling of occluded WebElements. Under WebDriver v3, this method is better avoided in favor of setOccludedElementApproach(com.isomorphic.webdriver.SmartClientWebDriver.OccludedElementApproach).
      Parameters:
      allow - sets ELEMENT_AT_POINT if true, otherwise ELEMENT strategy
    • setValueTolerance

      public void setValueTolerance(long valueTolerance)
      Parameters:
      valueTolerance - absolute deviation from expected value to allow, inclusive
    • setElementTolerance

      public void setElementTolerance(long elementTolerance)
      Parameters:
      elementTolerance - absolute deviation from expected value to allow, inclusive
    • setCanvasWidthTolerance

      public void setCanvasWidthTolerance(long canvasWidthTolerance)
      Parameters:
      canvasWidthTolerance - absolute deviation from expected value to allow, inclusive
    • setCanvasHeightTolerance

      public void setCanvasHeightTolerance(long canvasHeightTolerance)
      Parameters:
      canvasHeightTolerance - absolute deviation from expected value to allow, inclusive
    • clearTolerances

      public void clearTolerances()
      Resets all tolerances to their default values.
    • getElementWidth

      public int getElementWidth(org.openqa.selenium.By by)
      Get width of target element
      Parameters:
      by - element locator
      Returns:
      width of target element
    • getElementHeight

      public int getElementHeight(org.openqa.selenium.By by)
      Get height of target element
      Parameters:
      by - element locator
      Returns:
      height of target element
    • getElementPositionLeft

      public 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
    • getElementPositionTop

      public 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
    • getValue

      public Object getValue(org.openqa.selenium.By scLocator)
      Returns 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
    • getValueAsString

      public String getValueAsString(org.openqa.selenium.By scLocator)
      Similar to getValue(By) except always returns the value as a String. Uses JavaScript to perform the conversion. See getValueAsString(By, boolean).
      Parameters:
      scLocator - locator to SmartClient target whose value is desired
      Returns:
      element's value, as a String
    • getValueAsString

      public String getValueAsString(org.openqa.selenium.By scLocator, boolean asJavaScriptString)
      Similar to getValue(By) except always returns the value as a String. If asJavaScriptString is 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
    • setUseFrameworkValueAsFallback

      public void setUseFrameworkValueAsFallback(boolean useFrameworkValue)
      Sets whether getValue(org.openqa.selenium.By) should be called on locators as a fallback if getText(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 by getValue(org.openqa.selenium.By)). Default is false.
      Parameters:
      useFrameworkValue - whether to use the Framework value as the fallback
    • getText

      public String getText(org.openqa.selenium.By by)
      Returns text of element associated with locator, or the value if there's no associated text. (See setUseFrameworkValueAsFallback(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
    • getTable

      public String getTable(org.openqa.selenium.By scLocator, long row, long col)
      Returns the specified table cell display value.
      Returns:
      cell's display value
    • getEval

      public String getEval(String javaScript)
      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.
      Parameters:
      javaScript - statements to evaluate
      Returns:
      value of last statement
    • getEval

      public String getEval(String javaScript, String fallbackValue)
      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.

      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
    • setCanvasPropertyTrue

      public Boolean setCanvasPropertyTrue(org.openqa.selenium.By scLocator, String propertyName)
      Sets the specified canvas property true.
      Parameters:
      scLocator - canvas locator
      propertyName - property to set
      Returns:
      the old property value
    • setCanvasPropertyFalse

      public Boolean setCanvasPropertyFalse(org.openqa.selenium.By scLocator, String propertyName)
      Sets the specified canvas property false.
      Parameters:
      scLocator - canvas locator
      propertyName - property to set
      Returns:
      the old property value
    • clearCanvasProperty

      public Boolean clearCanvasProperty(org.openqa.selenium.By scLocator, String propertyName)
      Clears the specified canvas property by setting it null.
      Parameters:
      scLocator - canvas locator
      propertyName - property to clear
      Returns:
      the old property value
    • setCanvasProperty

      public 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
    • verifyElementWidth

      public 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
    • verifyElementHeight

      public 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
    • verifyElementPositionLeft

      public 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
    • verifyElementPositionTop

      public 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
    • verifyElementPresent

      public boolean verifyElementPresent(org.openqa.selenium.By by)
      Verify that a given element is present.
      Parameters:
      by - element locator
      Returns:
      whether the element is present
    • verifyElementVisible

      public boolean verifyElementVisible(org.openqa.selenium.By by)
      Verify that a given element is visible.
      Parameters:
      by - element locator
      Returns:
      whether the element is visible
    • verifyElementSelected

      public boolean verifyElementSelected(org.openqa.selenium.By by)
      Verify that a given element is selected.
      Parameters:
      by - element locator
      Returns:
      whether the element is selected
    • verifyElementClickable

      public boolean verifyElementClickable(org.openqa.selenium.By scLocator)
      Verify that a given element is clickable.
      Parameters:
      scLocator - element locator
      Returns:
      whether the element is clickable
    • verifyElementReadyForKeyPresses

      public 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.
    • verifyCanvasWidth

      public 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
    • verifyCanvasHeight

      public 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
    • verifyElementWidthWithTolerance

      public 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
    • verifyElementHeightWithTolerance

      public 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
    • setAllowJavaScriptToStringMatch

      public void setAllowJavaScriptToStringMatch(boolean allowJSMatch)
      Configures whether SmartClientWebDriver checks 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
    • verifyValueEmpty

      public boolean verifyValueEmpty(org.openqa.selenium.By scLocator)
      Verifies that target's value is empty. Note that both null and 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 case getValue(org.openqa.selenium.By) returns null. An empty List is also considered an empty value if allowCoordClickOnOccludingElement is true.
      Parameters:
      scLocator - locator to SmartClient target to check
      Returns:
      whether value is empty
    • verifyValue

      public boolean verifyValue(org.openqa.selenium.By scLocator, Boolean expected)
      Verifies that the target has the Boolean value expected.
      Parameters:
      scLocator - locator to SmartClient target to check
      expected - Boolean to match
      Returns:
      whether value matches expected Boolean
    • verifyValue

      public boolean verifyValue(org.openqa.selenium.By scLocator, Long expected)
      Verifies that the target has the Long value expected.
      Parameters:
      scLocator - locator to SmartClient target to check
      expected - Long to match
      Returns:
      whether value matches expected Long
    • verifyValueWithTolerance

      public boolean verifyValueWithTolerance(org.openqa.selenium.By scLocator, Long expected)
      Verifies that the target has the Long value expected within tolerance.
      Parameters:
      scLocator - locator to SmartClient target to check
      expected - Long to match
      Returns:
      whether value matches expected Long within tolerance
    • verifyValue

      public boolean verifyValue(org.openqa.selenium.By scLocator, Integer expected)
      Verifies that the target has the Integer value 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
    • verifyValueWithTolerance

      public boolean verifyValueWithTolerance(org.openqa.selenium.By scLocator, Integer expected)
      Verifies that the target has the Integer value expected within tolerance.
      Parameters:
      scLocator - locator to SmartClient target to check
      expected - Integer to match
      Returns:
      whether value matches expected Integer within tolerance
    • verifyValue

      public boolean verifyValue(org.openqa.selenium.By scLocator, String expected)
      Verifies that the target matches the String pattern. 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
    • verifyValueWithTolerance

      public boolean verifyValueWithTolerance(org.openqa.selenium.By scLocator, String expected)
      Verifies that the target matches the String pattern, 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 a valueTolerance of 10 is in use and JavaScript String matching mode is 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
    • verifyTextPresent

      public boolean verifyTextPresent(String expected)
      Verify 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.
    • verifyText

      public 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.
    • verifyText

      public boolean verifyText(org.openqa.selenium.By by, String expected)
      Verify 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.
    • verifyTextPresent

      public boolean verifyTextPresent(org.openqa.selenium.By by, String expected)
      Verify 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.
    • verifyTitle

      public boolean verifyTitle(String expected)
      Verify 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.
    • verifyTable

      public boolean verifyTable(org.openqa.selenium.By scLocator, long row, long col, String expected)
      Verify that specified table cell display value matches the expected String pattern. Whitespace at either end is ignored and the Selenium v1 matching prefixes mentioned in verifyValue(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
    • assertEval

      public boolean assertEval(String javaScript)
      Assert that the specified JavaScript script evaluates to empty String or null. See assertEval(String,String,boolean).
      Parameters:
      javaScript - script to run
      Returns:
      true if script evaluates to empty String or null, else false
    • assertEval

      public boolean assertEval(String javaScript, Object expected)
      Assert that the specified JavaScript script evaluates equal to the expected value. See assertEval(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
    • assertEval

      public boolean assertEval(String javaScript, Object expected, boolean asJavaScriptString)
      Assert that the specified JavaScript script evaluates equal to the expected value. See assertEval(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
    • assertEval

      public boolean assertEval(String javaScript, String expected)
      Assert that the specified JavaScript script evaluates equal to the expected value. See assertEval(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
    • assertEval

      public boolean assertEval(String javaScript, String expected, boolean asJavaScriptString)
      Assert 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 in executeScript(java.lang.String, java.lang.Object...). (This is for back compatibility with Selenium v1.)

      Note that assertEval is similar to waitForEval(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
    • waitForElementClickable

      public 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:
    • waitForElementClickable

      public 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
    • waitForElementNotClickable

      public 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:
    • waitForElementNotClickable

      public 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
    • waitForElementVisible

      public 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:
    • waitForElementVisible

      public 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
    • waitForElementPresent

      public 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
    • waitForElementPresent

      public 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
    • waitForElementNotPresent

      public 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
    • waitForElementNotPresent

      public 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
    • waitForElementNotVisible

      public 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:
    • waitForElementNotVisible

      public 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
    • waitForElementReadyForKeyPresses

      public 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
    • waitForElementReadyForKeyPresses

      public 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
    • waitForElementInViewport

      public 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
    • waitForElementInViewport

      public 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
    • waitForCanvasDone

      public boolean waitForCanvasDone(org.openqa.selenium.By scLocator)
      Wait until a target Canvas responds positively to the isCanvasDone() call.
      Parameters:
      scLocator - target canvas
      Returns:
      True if the canvas responded positively in time. False if timed out while trying
    • waitForCanvasDone

      public boolean waitForCanvasDone(org.openqa.selenium.By scLocator, long timeoutInSeconds)
      Wait until a target Canvas responds 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
    • waitForGridDone

      public boolean waitForGridDone(org.openqa.selenium.By scLocator)
      Wait until a target ListGrid responds positively to the isGridDone() call.
      Parameters:
      scLocator - target grid
      Returns:
      True if the grid responded positively in time. False if timed out while trying
    • waitForGridDone

      public boolean waitForGridDone(org.openqa.selenium.By scLocator, long timeoutInSeconds)
      Wait until a target ListGrid responds 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
    • waitForGridDone

      public boolean waitForGridDone(org.openqa.selenium.By scLocator, Boolean includeEdits)
      Wait until a target ListGrid responds 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
    • waitForGridDone

      public boolean waitForGridDone(org.openqa.selenium.By scLocator, Boolean includeEdits, long timeoutInSeconds)
      See waitForGridDone(org.openqa.selenium.By). Wait until a target ListGrid responds 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
    • waitForTileGridDone

      public boolean waitForTileGridDone(org.openqa.selenium.By scLocator)
      Wait until a target TileGrid responds positively to the isTileGridDone() call.
      Parameters:
      scLocator - target grid
      Returns:
      True if the grid responded positively in time. False if timed out while trying
    • waitForTileGridDone

      public boolean waitForTileGridDone(org.openqa.selenium.By scLocator, long timeoutInSeconds)
      Wait until a target TileGrid responds 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
    • waitForTileLayoutDone

      public boolean waitForTileLayoutDone(org.openqa.selenium.By scLocator)
      Wait until a target TileLayout responds positively to the isTileLayoutDone() call.
      Parameters:
      scLocator - target tileLayout
      Returns:
      True if the tileLayout responded positively in time. False if timed out while trying
    • waitForTileLayoutDone

      public boolean waitForTileLayoutDone(org.openqa.selenium.By scLocator, long timeoutInSeconds)
      Wait until a target TileLayout responds 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
    • waitForFormDone

      public boolean waitForFormDone(org.openqa.selenium.By scLocator)
      Wait until a target DynamicForm responds positively to the isFormDone() call.
      Parameters:
      scLocator - target form
      Returns:
      True if the form responded positively in time. False if timed out while trying
    • waitForFormDone

      public boolean waitForFormDone(org.openqa.selenium.By scLocator, long timeoutInSeconds)
      Wait until a target DynamicForm responds 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
    • waitForItemDone

      public boolean waitForItemDone(org.openqa.selenium.By scLocator)
      Wait until a target FormItem responds positively to the isItemDone() call.
      Parameters:
      scLocator - target item
      Returns:
      True if the item responded positively in time. False if timed out while trying
    • waitForItemDone

      public boolean waitForItemDone(org.openqa.selenium.By scLocator, long timeoutInSeconds)
      Wait until a target FormItem responds 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
    • waitForSystemDone

      public 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
    • waitForSystemDone

      public 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
    • waitForSystemDone

      public boolean waitForSystemDone(Boolean includeRedraws)
      Wait 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
    • waitForSystemDone

      public boolean waitForSystemDone(Boolean includeRedraws, Boolean includeEdits)
      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
      Returns:
      True if the element responded positively in time. False if timed out while trying
    • waitForSystemDone

      public 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
    • waitForSystemDone

      public boolean waitForSystemDone(String includePropList)
      Wait 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
    • waitForSystemDone

      public boolean waitForSystemDone(String includePropList, long timeoutInSeconds)
      Wait 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
    • waitForSystemDone

      public 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
    • waitForSystemDone

      public 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
    • waitForText

      public boolean waitForText(org.openqa.selenium.By by, String expected)
      Wait until a given element has a particular text value. See verifyText(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
    • waitForText

      public boolean waitForText(org.openqa.selenium.By by, String expected, long timeoutInSeconds)
      Wait until a given element has a particular text value. See verifyText(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
    • waitForHoverTextPresent

      public boolean waitForHoverTextPresent(String expected)
      Wait until the hover canvas shows a particular text value. See verifyText(org.openqa.selenium.By). See waitForHoverTextPresent(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
    • waitForHoverTextPresent

      public boolean waitForHoverTextPresent(String expected, long timeoutInSeconds)
      Wait until the hover canvas shows a particular text value. See verifyText(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 for verifyValue(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
    • waitForValue

      public boolean waitForValue(org.openqa.selenium.By scLocator, Object expected)
      Wait until a target matches the String pattern. See verifyValue(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
    • waitForValue

      public boolean waitForValue(org.openqa.selenium.By scLocator, Object expected, long timeoutInSeconds)
      Wait until a target matches the String pattern. See verifyValue(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
    • waitForCondition

      public boolean waitForCondition(String javaScript)
      Wait for a javascript expression to evaluate to true. See waitForCondition(String,long).
      Parameters:
      javaScript - script to run
    • waitForCondition

      public boolean waitForCondition(String javaScript, long timeoutInSeconds)
      Wait 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)
    • waitForCondition

      public boolean waitForCondition(String javaScript, long timeoutInSeconds, Object... argument)
      Wait 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)
    • waitForEval

      public boolean waitForEval(String javaScript, String expected)
      Wait for a javascript expression to evaluate to a value that matches the supplied String pattern under the rules described in verifyValue(org.openqa.selenium.By, java.lang.Boolean). See waitForEval(String,String,long).
      Parameters:
      javaScript - script to run
      expected - pattern to match against value of script
    • waitForEval

      public boolean waitForEval(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 in verifyValue(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)
    • waitForFrameToLoad

      public boolean waitForFrameToLoad(String frameLocator, long timeoutInSeconds)
      Wait 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
    • setBaseUrl

      public void setBaseUrl(String baseUrl)
      Set the Base URL against which tests will run
      Parameters:
      baseUrl - new base URL
    • get

      public void get(String relativeUrl)
      Fetch a URL relative to the baseURL.
      Parameters:
      relativeUrl - relative URL
    • get

      public void get(String relativeUrl, boolean maximize)
      Fetch a URL relative to the baseURL.
      Parameters:
      relativeUrl - relative url
      maximize - whether to maximize window
    • pause

      public void pause(long waitInMillis)
      Wait for the specified amount of time.
      Parameters:
      waitInMillis - amount of time, in milliseconds, to wait
    • selectWindowByName

      public void selectWindowByName(String name)
      Switch to window specified by name.
      Parameters:
      name - name of window to switch to
    • selectWindowByTitle

      public void selectWindowByTitle(String title)
      Switch to window specified by title.
      Parameters:
      title - title of window to switch to
    • scrollIntoViewIfNeeded

      public void scrollIntoViewIfNeeded(org.openqa.selenium.By by)
      Scroll the target into view if it's not already in view. See scrollIntoViewIfNeeded(By,WebElement).
      Parameters:
      by - target locator
    • scrollIntoViewIfNeeded

      public 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
    • click

      public SmartClientWebDriver click(org.openqa.selenium.By by)
      Send 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.
    • secondClick

      public SmartClientWebDriver secondClick(org.openqa.selenium.By by)
      Send 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.
    • doubleClick

      public SmartClientWebDriver doubleClick(org.openqa.selenium.By by)
      Send a double click to the locator target. This is just a convenience method that first calls click(By) and then secondClick(By).
      Parameters:
      by - target element or widget - if null then the previous element
      Returns:
      Itself, in order to allow chaining calls.
    • clickAndHold

      public SmartClientWebDriver clickAndHold(org.openqa.selenium.By by)
      Equivalent 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.
    • clickAndHoldAt

      public SmartClientWebDriver 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.
      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.
    • release

      public SmartClientWebDriver release(org.openqa.selenium.By by)
      Equivalent 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.
    • releaseAt

      public SmartClientWebDriver 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.
      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.
    • contextClick

      public SmartClientWebDriver contextClick(org.openqa.selenium.By by)
      Send 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.
    • mouseMove

      public SmartClientWebDriver mouseMove(org.openqa.selenium.By by)
      Simulate 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.
    • mouseMoveAt

      public SmartClientWebDriver mouseMoveAt(org.openqa.selenium.By by, int xOffset, int yOffset)
      Simulate 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.
    • dragAndDrop

      public 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.
    • dragAndDrop

      public SmartClientWebDriver dragAndDrop(org.openqa.selenium.By sourceBy, String offset)
      Deprecated.
      use the variant that takes separate coordinate offsets
      Simulate 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 use dragAndDropBy(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.
    • dragAndDropBy

      public 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.
    • sendKeys

      public SmartClientWebDriver sendKeys(org.openqa.selenium.By by, String keysToSend)
      Send 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.
    • type

      public SmartClientWebDriver type(org.openqa.selenium.By by)
      Sends an empty String to the target, clearing it if it's an editable text element. Similar to sendKeys(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.
    • type

      public SmartClientWebDriver type(org.openqa.selenium.By by, String keysToSend)
      Clears target if it's an editable text element. Regardless then sends it the specified String of keys. Similar to sendKeys(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.
    • type

      public SmartClientWebDriver type(org.openqa.selenium.By by, Long keyToSend)
      Alternative to sendKeys(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.
    • sendData

      public boolean sendData(org.openqa.selenium.By by, String keysToSend)
      Similar to type(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
    • keyPress

      public SmartClientWebDriver keyPress(org.openqa.selenium.By by, Long charToSend)
      Sends 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.
    • keyPress

      public SmartClientWebDriver keyPress(org.openqa.selenium.By by, String keysToSend)
      Similar to sendKeys(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.
    • keyDown

      public SmartClientWebDriver keyDown(org.openqa.selenium.By by, Long charToSend)
      Send 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.
    • keyUp

      public SmartClientWebDriver keyUp(org.openqa.selenium.By by, Long charToSend)
      Send 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.
    • keyDown

      public SmartClientWebDriver keyDown(org.openqa.selenium.By by, org.openqa.selenium.Keys theKey)
      Send 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.
    • keyUp

      public SmartClientWebDriver keyUp(org.openqa.selenium.By by, org.openqa.selenium.Keys theKey)
      Send 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.
    • shiftKeyDown

      public SmartClientWebDriver shiftKeyDown()
      To Support Selenese. This causes a keydown on key 16
      Returns:
      Itself, in order to allow chaining calls.
    • shiftKeyUp

      public SmartClientWebDriver shiftKeyUp()
      To Support Selenese. This causes a keyup on key 16
      Returns:
      Itself, in order to allow chaining calls.
    • controlKeyDown

      public SmartClientWebDriver controlKeyDown()
      To Support Selenese. This causes a keydown on key 17
      Returns:
      Itself, in order to allow chaining calls.
    • controlKeyUp

      public SmartClientWebDriver controlKeyUp()
      To Support Selenese. This causes a keyup on key 17
      Returns:
      Itself, in order to allow chaining calls.
    • focus

      public SmartClientWebDriver focus(org.openqa.selenium.By by)
      Set focus into the target element or canvas.
      Parameters:
      by - focus target
      Returns:
      Itself, in order to allow chaining calls.
    • focus

      public SmartClientWebDriver focus(org.openqa.selenium.By by, boolean clearModifiers)
      Set 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.
    • focus

      public 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.
    • blur

      public SmartClientWebDriver blur(org.openqa.selenium.By by)
      Blurs the target element or canvas.
      Parameters:
      by - blur target
      Returns:
      Itself, in order to allow chaining calls.
    • showConsole

      public void showConsole()
      Show the developer console.
    • setClientLogLevel

      public void setClientLogLevel(String category, long level)
      Sets 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
    • setClientLogLevel

      public void setClientLogLevel(String category, String level)
      Sets 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
    • setServerLogLevel

      public void setServerLogLevel(String category, String level)
      Sets 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