Webpage field validation in Studio X

In studio X I have the following request: ‘For each record, validate that a name and address is present in a field on a application page.’ I do not need to compare it to anything or save the answer anywhere just validate there is a name and a address present. I believe I would use a ‘Get Text’ activity then an ‘if’ condition. If true, for the ‘Get Text’ activity do I ‘Save to’ ‘Create Variable’ or will a ‘Copy to Clipboard’ suffice? For the ‘If’ activity, I think I can use the condition builder>‘Contains’> Notebook> Text> First Name and Last Name then create another one for the address, but I am not sure if there is an VB expression I can use in the Advanced Editor that will allow me to validate it all without all the condition inputs, if not what would be the address input since the Notebook>Text does not give the option. Any assistance you can offer is greatly appreciated.

Hi! Are the name and address that you want to validate in the same field or in different fields?
A simple approach would be to use the Get Text activity for the name and for the address and then check the conditions. It should look something like this


If you want to optimize it more, you can do something like this:

This way you will perform only 1 activity before checking, otherwise you would perform 2.
Hope this helps! :slight_smile:

Narcis Szene :

Thank you for your response. I found out that the bot will have to open a pdf that may have multiple letter templates and validate a name and address is present on each one. So, essentially the name and address you would see through a window envelope, they want to confirm it is looks like a true name and address without comparing to a list or database.

1 Like