Mobile

Common Functions

Method Name Parameter Return Type Usage Example
funcGetNativeAndroiddriver configFileName:String AndroidDriver<WebElement> To get native android driver androidDriver=MobileDriverSettings.funcGetNativeAndroiddriver(configFileName);
funcGetWebAndroidDriver configFileName:String AndroidDriver<WebElement> To get web android driver androidDriver = MobileDriverSettings.funcGetWebAndroidDriver(configFileName);
funcGetNativeIOSdriver configFileName:String IOSDriver<WebElement> To get native IOS driver IOSdriver = MobileDriverSettings.funcGetNativeIOSdriver(configFileName);
funcGetWebIOSdriver configFileName:String IOSDriver<WebElement> To get web IOS driver IOSdriver = MobileDriverSettings.funcGetWebIOSdriver(configFileName);
mobileElementBy mobileElement : MobileElement By By byEle = MobileHandlers.mobileElementBy(locator);
click locator : MobileElement void For click action MobileHandlers.click(locator)
clickByJsExecutor locator : MobileElement void MobileHandlers.clickByJsExecutor(locator);
enterText locator : MobileElement, value : String void For type action MobileHandlers.enterText(locator, value)
scrollAndClick locator : MobileElement, scrollType : String void MobileHandlers.scrollAndClick(locator, scrollType)
scrollToElement locator : MobileElement, scrollType : String void MobileHandlers.scrollToElement(locator, scrollType)
mobileButtonPress keyName : String void MobileHandlers.mobileButtonPress(keyName)
dropDownSetByVal locator : MobileElement, value:String boolean To select the value in dropbox by passing value. Returns true if the value exist in dropdown list MobileHandlers.dropDownSetByVal(locator, value)
dropDownSetByIndex locator : MobileElement, index : int boolean To select the value in dropbox by passing value. Returns true if the value exist for the given index in dropdown list MobileHandlers.dropDownSetByIndex(locator, index)
chkboxIsChecked locator : MobileElement boolean To verify the checkbox is checked MobileHandlers.chkboxIsChecked(locator)
switchToFrame locator : MobileElement void To switch to a new frame MobileHandlers.switchToFrame(locator)
swithBackFromFrame void To Switch back to default frame MobileHandlers.swithBackFromFrame()
switchToNewWindow void To switch to new window MobileHandlers.switchToNewWindow();
closeNewWindow void To close new window MobileHandlers.closeNewWindow();
switchToDefaultWindow void To switch to default window MobileHandlers.switchToDefaultWindow();
switchToAlert Alert switchToAlert().accept();
acceptAlert void MobileHandlers.acceptAlert();
dismissAlert void MobileHandlers.dismissAlert();
getTblHeaderVal locator : MobileElement LinkedHashMap<String, Integer> To fetch table headers values MobileHandlers.getTblHeaderVal(locator)
getTblBodyVal locator : WebElement LinkedHashMap<String, Integer> To fetch table body values MobileHandlers.getTblBodyVal(locator)
getTblTdVal locator : MobileElement, rowIndex: int, colIndex : int String To gettable cell value by row and column index MobileHandlers.getTblTdVal(locator,rowIndex,colIndex)
getTblThVal locator : MobileElement, rowIndex: int, colIndex : int String To get table column header value by row and column index MobileHandlers.getTblThVal(locator,rowIndex,colIndex)
getIndexofVal locator : MobileElement, value:String String String index = getIndexofVal(locator, value);
getColMapByHdrVal locator : MobileElement, colHeader:String LinkedHashMap<String, String> To get column values by header value MobileHandlers.getColMapByHdrVal(locator,colHeader)
getRowMapByIndxVal locator : MobileElement, rowIndex:int LinkedHashMap<String, String> To get row values by index value MobileHandlers.getRowMapByIndxVal(locator,rowIndex)
getRowMapByHdrVal locator : MobileElement, rowHeader:String LinkedHashMap<String, String> To get row values by header value MobileHandlers.getRowMapByHdrVal(locator,rowHeader)
getColMapByIndxVal locator : MobileElement, colIndex:int LinkedHashMap<String, String> To get column values by index value MobileHandlers.getColMapByIndxVal(locator,colIndex)
TblCelChkboxClick locator : MobileElement,value:String void To perform click action in checkbox inside a table cell MobileHandlers.TblCelChkboxClick(locator,value)
TblCelChkboxClick MobileElement : MobileElement,value:String void To perform click action in checkbox inside a table cell MobileHandlers.TblCelChkboxClick(locator,value)
TblCelLinkClick locator : MobileElement, value:String void To perform click a hyperlink inside a table cell MobileHandlers.TblCelLinkClick(locator,value)
fetchPropertyVal locator : MobileElement, property: String String To fetch the property value by property name for the locator MobileHandlers.fetchPropertyVal(locator,property)
verifyProperty locator : MobileElement, property: String expected : String To verify the property value with expected value MobileHandlers.verifyProperty(locator, property,expected)
verifyText locator : MobileElement, strVText : String boolean To verify Text MobileHandlers.verifyText(locator,strVText)
compareText strActualText : String,strCompText : String boolean To compare two text MobileHandlers.compareText(strActualText,strCompText)
existText locator : MobileElement boolean To check whether text value exist for the locator MobileHandlers.existText(locator)
clearText locator : MobileElement void To clear text MobileHandlers.clearText(locator)
objDisabled locator : MobileElement boolean To check the locator/object is disabled MobileHandlers.objDisabled(locator)
objExists locator : MobileElement To check the locator/object exist MobileHandlers.objExists(locator)

pCloudy Common Functions

Method Name Parameter Return Type Usage Example
funcGetpCloudyNativeAndroiddriver configFileName:String AndroidDriver<WebElement> To get pCloudy native android driver androidDriver=MobileDriverSettings.funcGetpCloudyNativeAndroiddriver(configFileName);
funcGetpCloudyWebAndroiddriver configFileName:String AndroidDriver<WebElement> To get pCloudy web android driver androidDriver = MobileDriverSettings.funcGetpCloudyWebAndroiddriver(configFileName);
funcGetpCloudyNativeIOSdriver configFileName:String IOSDriver<WebElement> To get pCloudy native IOS driver iosDriver = MobileDriverSettings.funcGetpCloudyNativeIOSdriver(configFileName);
funcGetpCloudyWebIOSdriver configFileName:String IOSDriver<WebElement> To get pCloudy web IOS driver iosDriver = MobileDriverSettings.funcGetpCloudyWebIOSdriver(configFileName);

SauceLab Common Functions

Method Name Parameter Return Type Usage Example
funcGetSauceNativeAndroiddriver configFileName:String AndroidDriver<WebElement> To get sauceLab native android driver androidDriver = MobileDriverSettings.funcGetSauceNativeAndroiddriver(configFileName);
funcGetSauceWebAndroiddriver configFileName:String AndroidDriver<WebElement> To get sauceLab web android driver androidDriver = MobileDriverSettings.funcGetSauceWebAndroiddriver(configFileName);
funcGetSauceNativeIOSdriver configFileName:String IOSDriver<WebElement> To get sauceLab native IOS driver IOSdriver = MobileDriverSettings.funcGetSauceNativeIOSdriver(configFileName);
funcGetSauceWebIOSdriver configFileName:String IOSDriver<WebElement> To get sauceLab web IOS driver IOSdriver = MobileDriverSettings.funcGetSauceWebIOSdriver(configFileName);