Class NeoUIContext
java.lang.Object
com.onenetwork.platform.tools.test.ui.AbstractUIContext
com.onenetwork.platform.tools.test.ui.neo.NeoUIContext
public class NeoUIContext extends AbstractUIContext
-
Field Summary
Fields Modifier and Type Field Description static org.openqa.selenium.By
LOADING_MASK
static java.lang.String
NEO_COMPONENT_FM_PACKAGE
static java.lang.String
NEO_COMPONENT_PACKAGE
static java.lang.String
SCROLL_INTO_VIEW
Fields inherited from class com.onenetwork.platform.tools.test.ui.AbstractUIContext
CHROME_BROWSER_METHOD, driver, EDGE_BROWSER_METHOD, EDGECHROMIUM_BROWSER_METHOD, FIREFOX_BROWSER_METHOD, IE_BROWSER_METHOD, implicitWaitInSeconds, loginPageWait, sleepInMilliseconds, timeoutInSeconds
-
Constructor Summary
Constructors Constructor Description NeoUIContext()
NeoUIContext(org.openqa.selenium.WebDriver driver)
Constructs a newUIContext
using the suppliedWebDriver
. -
Method Summary
Modifier and Type Method Description NeoComponent
createComponent(java.lang.String elementType, org.openqa.selenium.WebElement webElement)
protected void
createDriver()
For Chrome WebDriver the existing automated scripts may fail due to following reasons.NeoComponent
createFMComponent(java.lang.String elementType, org.openqa.selenium.WebElement webElement)
java.lang.String
getElementTypeForNeoComponent(org.openqa.selenium.WebElement neoEl)
This method is used to get the elementType for the Neo Componentorg.openqa.selenium.WebElement
scrollIntoView(org.openqa.selenium.WebElement webElement)
org.openqa.selenium.WebElement
waitUntilListItemVisible(java.lang.String itemText, java.lang.String itemClass)
Waits until List of item is visiblevoid
waitUntilMask(org.openqa.selenium.SearchContext rootElement, org.openqa.selenium.By loadingMask)
Waits for the mask element to be visible on UI.void
waitUntilUnmask()
Waits until the Ext loading mask has been removed.void
waitUntilUnmask(org.openqa.selenium.SearchContext rootElement)
Waits until the loading mask has been removed from some element.void
waitUntilUnmask(org.openqa.selenium.SearchContext rootElement, org.openqa.selenium.By loadingMask)
Overloaded version of waitUntilUnmask which takes xpath for WebElement of laoding maskMethods inherited from class com.onenetwork.platform.tools.test.ui.AbstractUIContext
clearWebDriver, clickByJavascriptExecutor, closeAllBrowserWindows, executeAutoIt, export, findElementsWithoutImplicitWait, focusByJavascriptExecutor, getBrowserVersion, getDriver, getHiddenWebElementText, getImplicitWaitInSeconds, getLoginPageWait, getSleepInMilliseconds, getTimeoutInSeconds, getWebDriver, isChrome, isEdge, isFirefox, isIE, isSeleniumGrid, isTestNg, isWebElementExists, logNodeDetails, mouseDownByJavascriptExecutor, setDriverPath, setImplcitWaitInSeconds, setImplicitWait, setLoginPageWait, setSleepInMilliseconds, setTestNg, setTimeoutInSeconds, setWebDriver, waitAndAcceptAlert, waitFor, waitUntil, waitUntil, waitUntilElementDisplayed, waitUntilElementDisplayedAndReturn, waitUntilElementExists, waitUntilElementExists, waitUntilElementExists, waitUntilElementExistsWithTimeout, waitUntilElementNotDisplayed, waitUntilElementsExist, waitUntilElementsExist, withNestedDriver, xPathContainsClass
-
Field Details
-
LOADING_MASK
public static final org.openqa.selenium.By LOADING_MASK -
SCROLL_INTO_VIEW
public static final java.lang.String SCROLL_INTO_VIEW- See Also:
- Constant Field Values
-
NEO_COMPONENT_PACKAGE
public static final java.lang.String NEO_COMPONENT_PACKAGE- See Also:
- Constant Field Values
-
NEO_COMPONENT_FM_PACKAGE
public static final java.lang.String NEO_COMPONENT_FM_PACKAGE- See Also:
- Constant Field Values
-
-
Constructor Details
-
NeoUIContext
public NeoUIContext() -
NeoUIContext
public NeoUIContext(org.openqa.selenium.WebDriver driver)Constructs a newUIContext
using the suppliedWebDriver
.- Parameters:
driver
-
-
-
Method Details
-
createComponent
public NeoComponent createComponent(java.lang.String elementType, org.openqa.selenium.WebElement webElement) -
createFMComponent
public NeoComponent createFMComponent(java.lang.String elementType, org.openqa.selenium.WebElement webElement) -
waitUntilListItemVisible
public org.openqa.selenium.WebElement waitUntilListItemVisible(java.lang.String itemText, java.lang.String itemClass)Waits until List of item is visible -
waitUntilUnmask
public void waitUntilUnmask()Waits until the Ext loading mask has been removed. -
waitUntilUnmask
public void waitUntilUnmask(org.openqa.selenium.SearchContext rootElement)Waits until the loading mask has been removed from some element. -
waitUntilUnmask
public void waitUntilUnmask(org.openqa.selenium.SearchContext rootElement, org.openqa.selenium.By loadingMask)Overloaded version of waitUntilUnmask which takes xpath for WebElement of laoding mask- Parameters:
rootElement
-loadingMask
-
-
waitUntilMask
public void waitUntilMask(org.openqa.selenium.SearchContext rootElement, org.openqa.selenium.By loadingMask)Waits for the mask element to be visible on UI. Needed for browser like Chrome and Edge for whome method waitUntilUnmask() execute before the mask is rendered.- Parameters:
rootElement
-loadingMask
-
-
scrollIntoView
public org.openqa.selenium.WebElement scrollIntoView(org.openqa.selenium.WebElement webElement) -
getElementTypeForNeoComponent
public java.lang.String getElementTypeForNeoComponent(org.openqa.selenium.WebElement neoEl)This method is used to get the elementType for the Neo Component- Parameters:
neoEl
-
-
createDriver
protected void createDriver()Description copied from class:AbstractUIContext
For Chrome WebDriver the existing automated scripts may fail due to following reasons. - Compared to IE driver, Chrome driver is faster and hence we may need to provide explicit waits in automation scripts. - In some scenarios, Chrome driver does not support sendKeys() on elements like div and span or containers with multiple input elements. As a workaround sendKeys() can be replaced with Actions API of Selenium.- Overrides:
createDriver
in classAbstractUIContext
-