Package org.ndviet.library
Class WebUI
- java.lang.Object
-
- org.ndviet.library.WebUI
-
public class WebUI extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description WebUI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclick(TestObject testObject)static voidclick(TestObject testObject, int timeout)static voidcloseBrowser()static org.openqa.selenium.WebElementfindWebElement(TestObject testObject)static java.util.List<org.openqa.selenium.WebElement>findWebElements(TestObject testObject)static java.lang.StringgetText(TestObject testObject)static java.util.List<java.lang.String>getTexts(TestObject testObject)static voidmoveToElement(TestObject testObject)static voidnavigateToUrl(java.lang.String url)static org.openqa.selenium.WebDriveropenBrowser()static org.openqa.selenium.WebDriveropenBrowser(java.lang.String url)static org.openqa.selenium.WebDriveropenBrowser(java.lang.String browser, java.lang.String url)static voidscrollToElement(TestObject testObject)static voidsetText(TestObject testObject, java.lang.String text)static voiduploadFile(TestObject testObject, java.lang.String absolutePath)static voidverifyElementNotPresent(TestObject testObject)static voidverifyElementNotVisible(TestObject testObject)static voidverifyElementPresent(TestObject testObject)static voidverifyElementTextContains(TestObject testObject, java.lang.String expectText)static voidverifyElementTextEquals(TestObject testObject, java.lang.String expectText)static voidverifyElementVisible(TestObject testObject)
-
-
-
Method Detail
-
openBrowser
public static org.openqa.selenium.WebDriver openBrowser()
-
openBrowser
public static org.openqa.selenium.WebDriver openBrowser(java.lang.String url)
-
openBrowser
public static org.openqa.selenium.WebDriver openBrowser(java.lang.String browser, java.lang.String url)
-
navigateToUrl
public static void navigateToUrl(java.lang.String url)
-
closeBrowser
public static void closeBrowser()
-
findWebElement
public static org.openqa.selenium.WebElement findWebElement(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
findWebElements
public static java.util.List<org.openqa.selenium.WebElement> findWebElements(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
click
public static void click(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
click
public static void click(TestObject testObject, int timeout) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setText
public static void setText(TestObject testObject, java.lang.String text) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getText
public static java.lang.String getText(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTexts
public static java.util.List<java.lang.String> getTexts(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
moveToElement
public static void moveToElement(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
scrollToElement
public static void scrollToElement(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
uploadFile
public static void uploadFile(TestObject testObject, java.lang.String absolutePath) throws java.lang.Exception
- Throws:
java.lang.Exception
-
verifyElementPresent
public static void verifyElementPresent(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
verifyElementNotPresent
public static void verifyElementNotPresent(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
verifyElementVisible
public static void verifyElementVisible(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
verifyElementNotVisible
public static void verifyElementNotVisible(TestObject testObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
verifyElementTextEquals
public static void verifyElementTextEquals(TestObject testObject, java.lang.String expectText) throws java.lang.Exception
- Throws:
java.lang.Exception
-
verifyElementTextContains
public static void verifyElementTextContains(TestObject testObject, java.lang.String expectText) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-