Skip to content

SeleniumWComponentWebElement

Mark Reeves edited this page Dec 21, 2017 · 4 revisions

SeleniumWComponentWebElement is an extension of org.openqa.selenium.WebElement which provides some basic, common functionality for testing WComponents. SeleniumWComponentWebElement overrides many of the members of WebElement to make them applicable to WComponents structure.

Added functionality

The most fundamental functionality provided by SeleniumWComponentWebElement is that calls to click() include in-built allowance for waiting until the page updates from WSubordinateControl or WAjaxControl (or re-loads due to full page submit) have completed before exiting the function. There is then a public function void clickNoWait() which allows an element to be clicked without this wait. This would be used, for example, when clicking a checkbox or similar where the test case knows the checkbox is not an AJAX controller or subordinate controller.

From v1.4 onwards SeleniumWComponentWebElement also provides:

  • boolean isHidden() which returns true if the component is hidden using WComponents Java API and is not completely symmetrical with WebElement.isDisplayed();
  • String getActiveId() which returns the ID of the wrapped HTML input element of a simple Input WComponent.
  • WebElement getElement() provides access to the backing WebElement without going through the WebDriver instance.

Related components

Further information

Clone this wiki locally