New Alpha release, version 1.29.0

240 views
Skip to first unread message

Henrik "The Developer" Lindqvist

unread,
Apr 27, 2021, 3:00:32 AM4/27/21
to Automate
Please test, report any issues, and give feedback. Opt-in for Alpha testing here.

This release contains a major rework of the Interact block, but flows should maintain compatibility and still work, please report if it doesn't! Also, there's a new Inspect layout block, a powerful replacement for the Inspect action. Both blocks now rely on XPath for selecting UI element to interact with, or layout to inspect. If any useful XPath function is missing, or the way the Inspect layout block works is too limiting, let me know. As such, please don't upload flows to the community yet, as i might break them if further changes are necessary.

What’s new:
  • Inspect layout block
  • Interact block got XPath expression input argument, replacing UI element class/text/id
  • Dialog confirm and Dialog message blocks got Linkify input argument
  • Gmail/E-mail send and Compose e-mail blocks now support multiple attachments
  • xpathEncode function
  • Various bug fixes

klok wert

unread,
Apr 28, 2021, 4:33:29 PM4/28/21
to automa...@googlegroups.com
I really like the XPath, it's more advanced and works really well, the only thing I don't really like about it is that it's much hander to hand craft a XPath, I would really like if the possibility would be added to be able to switch between XPath and the old class/text/id

Op di 27 apr. 2021 09:00 schreef Henrik "The Developer" Lindqvist <henrik.l...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/32633f8f-59c9-420b-ab01-2c8a088441f2n%40googlegroups.com.

Henrik "The Developer" Lindqvist

unread,
Apr 28, 2021, 5:06:59 PM4/28/21
to Automate
That's what the "Record interactions" button is for.
The problem with class/text/id is/was that it doesn't provide enough context, the Interact block had to "try" different elements to find one that supported the action, which may not be the correct one, as seen in the backward compatible XPath generated.
Even with XPath, the expression generated by the "Record interactions" button still has to make certain assumptions, e.g. find a "label", etc., but it should be far more accurate than before.
Only the user can make a 100% accurate XPath expression.

denis....@gmail.com

unread,
Apr 28, 2021, 5:17:19 PM4/28/21
to Automate
Just noticed with the new 1.29.0 version that for a few devices, inspect blocks were "deprecated" and couldn't inspect correctly the element anymore (Android 9, 1.1 One UI). On other devices, I have no issue yet.

What are the benefit of XPath ? compared to inspect UI element class/text/id that I'm using right now ? 

I think I'll just stay on 1.28.2 version for now - as it looks pretty complicated

klokhui...@gmail.com

unread,
Apr 28, 2021, 6:58:21 PM4/28/21
to Automate
Yes, but sadly the "Record interaction" thing doesn't always work with every button/element, it just doesn't record them
The easiest way was to craft one yourself using info from https://play.google.com/store/apps/details?id=com.appsisle.developerassistant but it's much harder, some may say that it's near impossible, to create your own XPath.
My initial thought was to ask to be able to switch between those 2 modes but actually it would be better if the "Record interaction" thing could be made to work better,
An example of something that doesn't get recorded at all by the "Record interaction" thing, is the send message button in WhatsApp.

Op woensdag 28 april 2021 om 23:06:59 UTC+2 schreef Henrik "The Developer" Lindqvist:

denis....@gmail.com

unread,
Apr 28, 2021, 8:16:14 PM4/28/21
to Automate
I also agree that the "Recorded Interaction" isn't always acurate. Would also be awesome if we could switch between XPath and the "old UI element method". Otherwise, will probably have to do it all for every single Interact blocks I have ... (a few hundreds lol)

And I never did XPath 

Henrik "The Developer" Lindqvist

unread,
Apr 28, 2021, 9:38:10 PM4/28/21
to Automate
What did the Inspect action do, on what UI element?
Please post the new XPath expression that was generated.

Henrik "The Developer" Lindqvist

unread,
Apr 28, 2021, 10:07:52 PM4/28/21
to Automate
As said, it very difficult to auto generate an 100% accurate XPath expression, since the UI layout may not always be structured the same, e.g. an UI element may appear before it.
There should be less need for the Developer Assistant app since there's an Inspect layout button to view the entire layout XML, but it's of course not as easy to "interpret".
Creating an XPath similar to the old way could be as simple as .//android.widget.Whatever[@android:text='whatever' and @android:id='@package:id/whatever'], but it would also be as inaccurate.

Do WhatsApp redraw the entire screen, e.g.  move to another activity, when the send button is clicked?

That is a problem, that the app proceeds to change the layout, as a response to the click event, before Automate can generate an XPath for it.
I'll investigate if there's anyway to "select" an UI element without it generating a click event.

denis....@gmail.com

unread,
Apr 29, 2021, 10:05:40 AM4/29/21
to Automate
Got it. Next time I have the bug again, I'll post here.

The Interact Inspect block (and thus the Interact Click) couldn't recognize the Close All button in Recent tabs. 

Henrik "The Developer" Lindqvist

unread,
Apr 29, 2021, 4:14:01 PM4/29/21
to Automate
I suspect the "Close All" not registering is because the button is removed once clicked, so Automate doesn't have time to generate the XPath expression.
I'm investigating the possibility to highlight/hover over buttons, to generate the XPath without having to click it.

denis....@gmail.com

unread,
Apr 30, 2021, 9:38:19 PM4/30/21
to Automate
That would be amazing Henrik ! 

denis....@gmail.com

unread,
May 22, 2021, 6:35:38 PM5/22/21
to Automate
Hello again Henrik, could you confirm that this isn't currently possible to interact (click) on "Close All" button, after pressing Recent Tabs ? 

I tried so many different XPath, but none of them worked so far. I'm wondering if there is any workaround... It worked well with the previous class/ID system, so it should be possible I think ? 

I also tried to replicate it that way as you said, with :  
.//android.widget.Whatever[@android:text='whatever' and @android:id='@package:id/whatever']
But no luck.

With class/ID, it always worked for me with those parameters :
Action : click
Package : com.sec.android.app.launcher
UI class : android.widget.Button
UI text : Close all

Thank you !! 

Henrik "The Developer" Lindqvist

unread,
May 23, 2021, 4:01:09 AM5/23/21
to Automate
You need to use the inspect/search tool to generate the XPath, then change the action to Click.
Recording a Click won't work since the button is removed when clicked, before Automate can generate the XPath.

denis....@gmail.com

unread,
May 23, 2021, 7:13:25 AM5/23/21
to Automate
The Inspect Layout returns a "Layout inacessible" and can't make it work with the correct XPath syntax (even with simple syntax starting with .//) :
.//android.widget.TextView[@android:id='com.android.app.launcher:id/clear_all' and @android:text='Close all']

I've also been reading that XPath might have issue with the fact that there is a space between "Close" and "all" in the TextView. So maybe it's not even possible with XPath, idk.

I will just go for now with the "Interact Touch" block. 
It could be an interesting feature to be able to use XPath or Element/ID (old way) whenever XPath doesn't work. On my end across my huge flows, only the buttons in the "Recent Tab" doesn't work, like the "Close all". All the rest works very good with XPath ! 

김아린

unread,
May 23, 2021, 7:14:38 AM5/23/21
to automa...@googlegroups.com

2021년 5월 23일 (일) 오후 8:13, denis....@gmail.com <denis....@gmail.com>님이 작성:
--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.

Henrik "The Developer" Lindqvist

unread,
May 23, 2021, 9:00:31 AM5/23/21
to Automate
The id is missing an @, also, in my launcher it's a button, i.e.:
.//android.widget.Button[@android:id='@com.android.app.launcher:id/clear_all' and @android:text='Close all']

XPath should have no issues with spaces.

Steve Jones

unread,
May 26, 2021, 11:29:57 PM5/26/21
to automa...@googlegroups.com
My automate app doesnt run flow automatically and when  I open the app flows starts immediately at whatever time I'm opening it

--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.

Henrik "The Developer" Lindqvist

unread,
May 27, 2021, 5:28:18 AM5/27/21
to Automate
Reply all
Reply to author
Forward
0 new messages