Skip to content

Instantly share code, notes, and snippets.

View saikrishna321's full-sized avatar
:octocat:
Focusing

Sai Krishna saikrishna321

:octocat:
Focusing
View GitHub Profile
@wswebcreation
wswebcreation / getNativeText.js
Created July 18, 2018 07:36
Get text from native iOS/Android elements with webdriver.io and Appium
/**
* This a method to get text from a native iOS/Android app component.
* It can be used when you are using webdriver.io
*
* In the app I need to automate I found out that:
* - iOS will have the complete text (of all the childeren) in the parent component.
* - on Android a component can have mutiple childrens, that's why you get an array of text back
*
* Feel free to use it for all kinds of purposes, a star is much appreciated ;-)
*