ATS Find Element

0
Hello. In the ATS documentation for 'Find' there are three entries; Find Element By CSS Find Element By ID Find Element By Sizle   Yet within ATS itself there is another option simply called 'Find Element', which has the options 'Find By' and 'Find Using'. I'm trying to retrieve a particular widget as the return value so that I can then use this as the context in subsequent test steps. I've tried using 'Find Element By CSS' and provided the full css tag 'mx-name-container123' however this fails. Is 'Find Element' intended to be a way of achieving this by providing the widget name in the 'Find By', ie 'container123' ?    Many thanks Patrick       
asked
1 answers
3

Hi Pattrick,

The Find Element functions in ATS are mapping to the native selenium functionality. They are intended to be used when the standard mendix functions are not applicable.

In your case in order to find a widget you can use the "Find/Assert widget" function -  https://docs.mendix.com/ats/refguide/rg-version-2/function-reference#5-widget-find

Quoting from the documentation: 

Finds/asserts a Mendix widget by its given name. It is possible to use a sequence of names as a path (separated by spaces).

I would suggest to use this function to find a widget in a mendix up. You only need to pass the mendix name e.g. 'container123'.
If you want to still use "Find element by CSS" then you need to add a dot at the begging of the class 

.mx-name-container123

Hope this helps,

-Andrej

PS: The link you posted was from the old reference guide for ATS 1. I am not sure if you are using ATS 1 or ATS 2, but please check if you are looking in the right reference guide.

answered