Scheduled actions "'subtype': 'xml'"

Scheduled actions “‘subtype’: ‘xml’” give us opportunity to get page source, that looks like this:

<android.widget.FrameLayout class=“android.widget.FrameLayout”>
<android.widget.LinearLayout class=“android.widget.LinearLayout”>
<android.widget.FrameLayout class=“android.widget.FrameLayout”>
<android.widget.LinearLayout class=“android.widget.LinearLayout”>
<android.widget.FrameLayout class=“android.widget.FrameLayout”>
<android.widget.FrameLayout class=“android.widget.FrameLayout”>
<android.widget.FrameLayout class=“android.widget.FrameLayout”>
<android.widget.FrameLayout class=“android.widget.FrameLayout”>
<android.view.ViewGroup class=“android.view.ViewGroup”>
<android.widget.ImageView class=“android.widget.ImageView” />
<android.view.ViewGroup class=“android.view.ViewGroup”>
<android.widget.TextView class=“android.widget.TextView” />
<android.widget.LinearLayout class=“android.widget.LinearLayout”>
<android.widget.ImageView class=“android.widget.ImageView” />
<android.widget.ImageView class=“android.widget.ImageView” />
<android.widget.ImageView class=“android.widget.ImageView” />
<android.widget.ImageView class=“android.widget.ImageView” />
</android.widget.LinearLayout>
</android.view.ViewGroup>

how we can get profit from this command? we just get text of DOM in String format
can we maybe get elements, text from elements or something like this?

I can’t speak for everybody, but I use page source to quickly verify elements. You don’t give any indication of what language you are using, so I will use Ruby as that’s what I’m using. Getting xml source and verifying elements is much quicker than getting elements in other ways, downside is that you can’t interact with these elements (click, enter text, etc) but for verification it’s nearly perfect.

For searching, use gem Nokogiri to search xml. For some other language use appropriate library: