How do I write elements for WebAutomation?

It appears Robin has the major browsers covered quite well.

However, I’m not sure what selectors I should use, for example, for the ‘Click’ action: Relative XPath, Absolute XPath, CSS, Class, Id, something else?

I would also like to know how to extract text from elements, as this is RPA after all :slight_smile: . If this is something that must be done in conjunction with the Softomotive Automation extension, might there be some documentation showing how this is done? According to the docs, WinAutomation has to control these extensions, but I’m assuming Robin can do it as well.

Thanks!

Regards,
burque505

Hello burque505,

You should use UISpy to extract elements from the web.
Let’s say for example that you want to get the inner text of a paragraph in the official Robin website.
You open UISpy, click on “Add control” button and select the element of your choice.


(I chose the “Why Robin” paragraph).

You get the following result:

To make things more clear I renamed the captured elements and saved my .appmask file with an appropriate name.

I edited the captured element’s selector:

I included every element from the start (body etc.) and removed the class attribute from everything.

After that I deleted the old selector.

Then I created a Robin script to extract that element’s value.
Note that you have to explicitly import the .appmask file at the top of your script.


The UISpy included with Robin is not as refined as the one utilized by WinAutomation.
In order to get inner values you must utilize HTMLElements, like the “innerText” in the example above.

Best regards,
J.


James Papadimitriou
Technical Evangelist

1 Like

@jpap,

Thank you very much for a clear and useful tutorial. I followed it and duplicated your results. Possibly worth mentioning are a few points:

  1. The UiSpy selector builder interface may appear differently than that in the tutorial. Mine has this pane:

webelements

  1. I had a little difficulty finding the “Rename” icon, so here are a few images reflecting the interface I have (the “Rename” icon is circled in blue):

renaming

rename2

Also, I have some questions that I hope the following image will illustrate (possibly illegible scribbling aside :grinning:):

questions

Thanks again!
Best regards,
burque505

Thank you for your feedback! :smiley:
It seems you have an older version installed on your machine.
Make sure you download and install the latest release from the official website.
Regarding the selector the syntax goes as follows:

[name of the .appmask file].[name of the application you are extracting data from].[screen/window name].[control name]

Best regards,
J.


James Papadimitriou
Technical Evangelist

1 Like

@jpap,
I just downloaded and reinstalled (directly from the website, as I did before). My interface is still the same, and the Calculator example I used yesterday still runs fine as is.
Best regards,
burque505

Interesting. It might have to do with the Windows version you are using.
I am working from Windows 10.
From what I see in your screenshots you are using Windows 7, right?

Best regards,
J.


James Papadimitriou
Technical Evangelist

Win7, correct. I will fire it up in Win10 and see if it’s different.

EDIT: Just checked, my interface is the same on both machines.
V. 0.9.1.5517, October 3, 2019

Best regards,
burque505