Page 1 of 1

Condition checking

Posted: 07 Oct 2019 08:02
by Akt
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.

Re: Condition checking

Posted: 07 Oct 2019 09:06
by icefox56
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