Condition checking

Post your questions and help other users.

Moderator: Martin

Post Reply
Akt
Posts: 133
Joined: 25 May 2014 08:57

Condition checking

Post by Akt » 07 Oct 2019 08:02

What is the condition to check whether this is displayed on screen or not.
Trigger is UI Event: Window opened package com.android.settings contains text Settings

I want to know the condition.
Attachments
Screenshot_2019-10-07-13-21-38-233_com.android.settings.png
Screenshot_2019-10-07-13-21-38-233_com.android.settings.png (79.03 KiB) Viewed 5863 times

icefox56
Posts: 53
Joined: 15 Aug 2017 02:56

Re: Condition checking

Post by icefox56 » 07 Oct 2019 09:06

What are you trying to achieve with the flow?
I don't know how to do this with the UI event trigger. But you can do something like,

Trigger: App Task started
Package name = com.android.settings

Action: Control UI
text=getTextInActiveWindow()

Condition: Expression
contains(text, "Use USB to")

Here, True= Window is displayed; False= Not displayed

Originally explained by @Desmanto viewtopic.php?t=6894
Asus Zenfone Max pro M1, Stock android, Oreo 8.1, Rooted

Post Reply