Class NotificationPage
- java.lang.Object
-
- com.qaprosoft.carina.core.foundation.webdriver.DriverHelper
-
- com.qaprosoft.carina.core.gui.AbstractUIObject
-
- com.qaprosoft.carina.core.gui.AbstractPage
-
- com.qaprosoft.carina.core.gui.mobile.devices.MobileAbstractPage
-
- com.qaprosoft.carina.core.gui.mobile.devices.android.phone.pages.notifications.NotificationPage
-
- All Implemented Interfaces:
IDriverPool
,IAndroidUtils
,ICustomTypePageFactory
,IMobileUtils
public class NotificationPage extends MobileAbstractPage implements IAndroidUtils
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.zebrunner.carina.utils.android.IAndroidUtils
IAndroidUtils.SelectorType
-
Nested classes/interfaces inherited from interface com.zebrunner.carina.utils.mobile.IMobileUtils
IMobileUtils.Direction, IMobileUtils.Zoom
-
-
Field Summary
Fields Modifier and Type Field Description protected ExtendedWebElement
dismissBtn
protected ExtendedWebElement
notification_scroller
protected static org.openqa.selenium.By
NOTIFICATION_XPATH
protected java.util.List<ExtendedWebElement>
notifications
protected java.util.List<ExtendedWebElement>
notificationsOtherDevices
protected ExtendedWebElement
title
-
Fields inherited from class com.qaprosoft.carina.core.gui.mobile.devices.MobileAbstractPage
DEFAULT_TRIES, DELAY, ONE_SEC_TIMEOUT, PUSH_NOTIFICATIONS_TIMEOUT, SHORT_TIMEOUT, SWIPE_DURATION
-
Fields inherited from class com.qaprosoft.carina.core.gui.AbstractUIObject
name, rootBy, rootElement, uiLoadedMarker
-
Fields inherited from class com.qaprosoft.carina.core.foundation.webdriver.DriverHelper
CRYPTO_PATTERN, cryptoTool, driver, EXPLICIT_TIMEOUT, pageURL, RETRY_TIME, timer
-
Fields inherited from interface com.zebrunner.carina.utils.android.IAndroidUtils
baseInitCmd, executor, LANGUAGE_CHANGE_APP_PATH, SCROLL_MAX_SEARCH_SWIPES, SCROLL_TIMEOUT, UTILS_LOGGER
-
Fields inherited from interface com.zebrunner.carina.utils.factory.ICustomTypePageFactory
DOUBLE_OBJ_STR, DOUBLE_STR, INT_STR, INTEGER_STR, LONG_OBJ_STR, LONG_STR, PAGEFACTORY_LOGGER, REFLECTIONS, VERSION_SPLITTER
-
Fields inherited from interface com.qaprosoft.carina.core.foundation.webdriver.IDriverPool
currentDevice, customCapabilities, DEFAULT, driversMap, driversPool, nullDevice, POOL_LOGGER
-
Fields inherited from interface com.zebrunner.carina.utils.mobile.IMobileUtils
DEFAULT_MAX_SWIPE_COUNT, DEFAULT_MIN_SWIPE_COUNT, DEFAULT_TOUCH_ACTION_DURATION, EXPLICIT_TIMEOUT, helper, MINIMUM_TIMEOUT, UTILS_LOGGER
-
-
Constructor Summary
Constructors Constructor Description NotificationPage(org.openqa.selenium.WebDriver driver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanNotificationByService()
cleanNotificationByServicevoid
clearNotifications()
clearNotificationsvoid
clickAlert(java.lang.String alertText)
void
collapseStatusBar()
collapseStatusBarjava.util.List<com.zebrunner.carina.utils.mobile.notifications.android.Notification>
getAllAvailableNotifications()
getAllAvailableNotificationsjava.lang.String
getItemText(int num)
getItemTextjava.lang.String
getItemTitle(int num)
getItemTitleint
getLastItemsContentSize()
getLastItemsContentSizeboolean
isClearAllBtnLoaded()
isClearAllBtnLoadedboolean
isNativeNotificationPage()
isNativeNotificationPageboolean
isOpened()
boolean
isOpened(long timeout)
isOpenedboolean
isStatusBarExpanded()
isStatusBarExpandedvoid
tapClearAllBtn()
-
Methods inherited from class com.qaprosoft.carina.core.gui.AbstractPage
assertPageOpened, assertPageOpened, getPageOpeningStrategy, isPageOpened, isPageOpened, savePageAsPdf, savePageAsPdf, setPageOpeningStrategy, waitForJSToLoad, waitForJSToLoad
-
Methods inherited from class com.qaprosoft.carina.core.gui.AbstractUIObject
assertUIObjectNotPresent, assertUIObjectNotPresent, assertUIObjectPresent, assertUIObjectPresent, getLoadingStrategy, getName, getRootBy, getRootElement, getRootExtendedElement, getUiLoadedMarker, isUIObjectPresent, isUIObjectPresent, setLoadingStrategy, setName, setRootBy, setRootElement, setRootExtendedElement, setUiLoadedMarker
-
Methods inherited from class com.qaprosoft.carina.core.foundation.webdriver.DriverHelper
acceptAlert, addCookie, allElementListsAreNotEmpty, allElementListsAreNotEmpty, allElementsPresent, allElementsPresent, assertElementPresent, assertElementPresent, assertElementWithTextPresent, assertElementWithTextPresent, cancelAlert, clickAny, clickAny, dragAndDrop, dragAndDropHtml5, findExtendedWebElement, findExtendedWebElement, findExtendedWebElement, findExtendedWebElement, findExtendedWebElements, findExtendedWebElements, getClipboardText, getCurrentUrl, getCurrentUrl, getDriver, getPageSource, getPageURL, getTitle, getTitle, isAlertPresent, isAnyElementPresent, isAnyElementPresent, isElementNotPresent, isElementNotPresent, isElementNotPresent, isElementWithTextPresent, isElementWithTextPresent, isPageOpened, isPageOpened, isTitleAsExpected, isTitleAsExpectedPattern, isUrlAsExpected, isUrlAsExpected, navigateBack, open, openTab, openURL, openURL, pause, pause, performIgnoreException, pressTab, refresh, refresh, returnAnyPresentElement, returnAnyPresentElement, setClipboardText, setDriver, setPageAbsoluteURL, setPageURL, slide, switchWindow, trigger, trigger, waitUntil
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.zebrunner.carina.utils.android.IAndroidUtils
allowInvisibleElements, authByFingerPrint, changePermissions, checkTimeout, clearAppCache, closeStatusBar, configuratorSetActionAcknowledgmentTimeout, configuratorSetKeyInjectionDelay, configuratorSetScrollAcknowledgmentTimeout, configuratorSetWaitForIdleTimeout, configuratorSetWaitForSelectorTimeout, disableGPS, disableWifi, displayRecentApps, enableGPS, enableNotificationListener, enableWifi, executeAdbCommand, executeDeepLink, executeMobileScript, executeShell, executeShell, getAppPermissions, getAppVersion, getAppVersionName, getBatteryInfo, getCurrentActivity, getCurrentDeviceFocus, getCurrentPackage, getCurrentPackageActivity, getDeviceLanguage, getDeviceModel, getDeviceTimezone, getDisplayDensity, getPerformanceData, getScrollContainerSelector, getScrollToElementSelector, getSupportedPerformanceDataTypes, getSystemBars, getSystemDeviceLanguage, ignoreUnimportantViews, installApk, installApk, isAirplaneModeEnabled, isCarrierConnectionAvailable, isGPSEnabled, isWifiEnabled, longPressKey, makeGsmCall, normalizeTagNames, openAppMenuFromDeviceSettings, openDeveloperOptions, openDeviceSettings, openStatusBar, openURL, pressBack, pressHome, pressKeyboardKey, pressKeyboardKey, pressKeyboardKeys, pressNextKey, pressSearchKey, replaceElementValue, scroll, scroll, scroll, scroll, sendSMS, setClipboard, setClipboardText, setDeviceDefaultTimeZoneLanguage, setDeviceDefaultTimeZoneLanguage, setDeviceLanguage, setDeviceLanguage, setElementResponseAttributes, setGsmSignalStrength, setGsmVoice, setLocation, setNetworkSpeed, setPowerAC, setPowerCapacity, setShouldUseCompactResponses, setTrackScrollEvents, shutdownOnPowerDisconnect, startActivity, switchToApp, switchToApp, switchToApp, takeScreenShot, toggleAppNotificationsFromDeviceSettings, triggerDeeplink, typeWithADB
-
Methods inherited from interface com.zebrunner.carina.utils.factory.ICustomTypePageFactory
comparePrimitives, getConstructorByParams, initPage, initPage
-
Methods inherited from interface com.qaprosoft.carina.core.foundation.webdriver.IDriverPool
getDevice, getDevice, getDevice, getDriver, getDriver, getDriver, getDriver, getDriver, getDrivers, isDeviceRegistered, isDriverRegistered, quitDriver, quitDriver, quitDrivers, removeCapabilities, restartDriver, restartDriver, setCapabilities
-
Methods inherited from interface com.zebrunner.carina.utils.mobile.IMobileUtils
clearAppCache, closeApp, dragAndDrop, dragAndDrop, getAppState, getAppStringMap, getAppStringMap, getAppStringMap, getAvailableContexts, getCapabilities, getClipboard, getContext, getDeviceTime, getDeviceTime, getLocation, getOrientation, getRotation, getSettings, getTextFromClipboard, hideKeyboard, installApp, installApp, isApplicationInstalled, isAppRunning, isAppRunning, isChecked, isDeviceLocked, isKeyboardShown, lockDevice, lockDevice, longPress, longTap, pressBottomRightKey, pullFile, pullFolder, pushFile, pushFile, removeApp, removeApp, rotate, rotate, runAppInBackground, setClipboard, setDeviceDefaultTimeZoneAndLanguage, setDeviceDefaultTimeZoneAndLanguage, setLocation, setSetting, setSetting, setSettings, setSettings, setTextToClipboard, startApp, startApp, startRecordingScreen, startRecordingScreen, stopRecordingScreen, stopRecordingScreen, swipe, swipe, swipe, swipe, swipe, swipe, swipe, swipe, swipe, swipe, swipe, swipeDown, swipeDown, swipeInContainer, swipeInContainer, swipeLeft, swipeLeft, swipeLeft, swipeRight, swipeRight, swipeRight, swipeUp, swipeUp, switchContext, tap, tap, tap, terminateApp, terminateApp, terminateApp, unlockDevice, zoom, zoom
-
-
-
-
Field Detail
-
NOTIFICATION_XPATH
protected static final org.openqa.selenium.By NOTIFICATION_XPATH
-
title
protected ExtendedWebElement title
-
notification_scroller
protected ExtendedWebElement notification_scroller
-
notifications
protected java.util.List<ExtendedWebElement> notifications
-
notificationsOtherDevices
protected java.util.List<ExtendedWebElement> notificationsOtherDevices
-
dismissBtn
protected ExtendedWebElement dismissBtn
-
-
Method Detail
-
isNativeNotificationPage
public boolean isNativeNotificationPage()
isNativeNotificationPage- Returns:
- boolean
-
isClearAllBtnLoaded
public boolean isClearAllBtnLoaded()
isClearAllBtnLoaded- Returns:
- boolean
-
getLastItemsContentSize
public int getLastItemsContentSize()
getLastItemsContentSize- Returns:
- int
-
getItemTitle
public java.lang.String getItemTitle(int num)
getItemTitle- Parameters:
num
- notification number- Returns:
- String
-
getItemText
public java.lang.String getItemText(int num)
getItemText- Parameters:
num
- notification number- Returns:
- String
-
tapClearAllBtn
public void tapClearAllBtn()
-
clearNotifications
public void clearNotifications()
clearNotifications
-
cleanNotificationByService
public void cleanNotificationByService()
cleanNotificationByService
-
getAllAvailableNotifications
public java.util.List<com.zebrunner.carina.utils.mobile.notifications.android.Notification> getAllAvailableNotifications()
getAllAvailableNotifications- Returns:
- List of Notification
-
collapseStatusBar
public void collapseStatusBar()
collapseStatusBar
-
isStatusBarExpanded
public boolean isStatusBarExpanded()
isStatusBarExpanded- Returns:
- boolean
-
clickAlert
public void clickAlert(java.lang.String alertText)
-
isOpened
public boolean isOpened(long timeout)
isOpened- Parameters:
timeout
- long- Returns:
- boolean
-
isOpened
public boolean isOpened()
- Specified by:
isOpened
in classMobileAbstractPage
- Returns:
- true by default. Override it in child classes
-
-