diff options
Diffstat (limited to 'integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/AbstractPageObject.java')
-rw-r--r-- | integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/AbstractPageObject.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/AbstractPageObject.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/AbstractPageObject.java index 1ad049ff13..47b655924c 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/AbstractPageObject.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/AbstractPageObject.java @@ -75,6 +75,16 @@ public abstract class AbstractPageObject implements PageObject { } /** + * Find an element based on the provided xpath. + * + * @param xpath the xpath expression to search for the element + * @return the WebElement if found, otherwise throws an exception + */ + protected WebElement findElement(final String xpath) { + return webDriver.findElement(By.xpath(xpath)); + } + + /** * Find elements based on the provided locator. * * @param locator the By locator |