Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Archives: FAQs

Mobile App Context Examples

Get Current ContextRetrieve the current context. This can be either NATIVE_APP for the native context, or a web view context, which will be:iOS – WEBVIEW_Android – WEBVIEW_String context = driver.getContext(); Get All ContextsRetrieve all the contexts available to be automated. This will include, at least, the native context. There can also be zero or more …

Mobile App Context Examples Read More »

Example Actions on Mobile Elements

ClickClick element at its center point.MobileElement el = driver.findElementByAccessibilityId(“SomeId”);el.click(); Send KeysSend a sequence of key strokes to an elementMobileElement element = (MobileElement) driver.findElementByAccessibilityId(“SomeAccessibilityID”);element.sendKeys(“Hello world!”); Clear ElementClear an element’s valueMobileElement element = (MobileElement) driver.findElementByAccessibilityId(“SomeAccessibilityID”);element.clear();

Example Attributes of Mobile Elements

Get Element TextMobileElement element = (MobileElement) driver.findElementByClassName(“SomeClassName”);String elText = element.getText(); Get Tag NameMobileElement element = (MobileElement) driver.findElementByAccessibilityId(“SomeAccessibilityID”);String tagName = element.getTagName(); Get Element AttributeMobileElement element = (MobileElement) driver.findElementByAccessibilityId(“SomeAccessibilityID”);String tagName = element.getAttribute(“content-desc”); Is Element SelectedDetermine if a form or form-like element (checkbox, select, etc…) is selectedMobileElement element = (MobileElement) driver.findElementByAccessibilityId(“SomeAccessibilityID”);boolean isSelected = element.isSelected(); Is Element EnabledMobileElement element …

Example Attributes of Mobile Elements Read More »

Android ‘UIScrollable’ swipe

Search by text Search by id Search by id and text Long view issue For some longer views it is necessary to increase “setMaxSearchSwipes”. This value allows to set the maximum count of swipe retries made until the search is stopped.