Skip autofill field if data already present in it

Hi, is there a way to skip autofill field if some data is already present in that particular field and move to next fields.

Example: part of my code is given below. Sometimes I have to check if field ‘DoneBy’ is already filled with something like XYZ or not, if it’s blank then I fill it with AAA. Can the code identify if it’s filled or blank before executing ‘type’ command?

{
“Command”: “click”,
“Target”: “id=DoneBy”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=DoneBy”,
“Value”: “AAA”
},
{
“Command”: “click”,
“Target”: “id=ApprovedBy”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=ApprovedBy”,
“Value”: “BBB”
},

Thanks.

This is a very good question and very hard to solve

I think that ui vision can not know if a field have or not a value because is not submitted but you can know it with desktop automation, you field empty field and with and if the field is empty you fill it otherwise go next command.

It’a a very hard macro to create but you can use this type of command.

Search empty field with image recognition, add an if, if image not found you fill the field otherwise go next command.

Another solution can be sourcesearch to find the text saved in html code of page.

To create this macro you need be a very expert it’s very hard.

https://ui.vision/rpa/docs/selenium-ide/sourceextract-sourcesearch

https://ui.vision/rpa/x/desktop-automation

Actually, this could be easily done with store Value.

  • Extract field data with storeValue
  • If text => Skip TYPE
  • If no text found => TYPE text…
2 Likes

Thanks again ulrich, this solved my problem.