I could really use some logic with a registration forum that I am trying to automate where I take the data from my CRM software and input it into another website. The issue I am facing is with the logic if someone fails to enter a field:
The script starts off searching how a client decided to fine-tune their search through one of the following static options: “by General Area” or “by Address” as seen in the code below:
,
{
"Command": "storeText",
"Target": "xpath=//*[@id=\"app-container\"]/div/div/div[2]/div/div/div/div/div/div[3]/div[3]/div/div/div/div/form[15]/div/div",
"Value": "Fine_Tune_Search",
"Description": ""
},
{
"Command": "if_v2",
"Target": "${Fine_Tune_Search}.includes(\"Address\") == true",
"Value": "",
"Description": ""
},
{
"Command": "storeText",
"Target": "xpath=//*[@id=\"app-container\"]/div/div/div[2]/div/div/div/div/div/div[3]/div[3]/div/div/div/div/form[16]/div/div",
"Value": "ADDRESS_Ideal_Location",
"Description": ""
},
{
"Command": "storeText",
"Target": "xpath=//*[@id=\"app-container\"]/div/div/div[2]/div/div/div/div/div/div[3]/div[3]/div/div/div/div/form[17]/div/div",
"Value": "CITY_Ideal_Location",
"Description": ""
},
{
"Command": "storeText",
"Target": "xpath=//*[@id=\"app-container\"]/div/div/div[2]/div/div/div/div/div/div[3]/div[3]/div/div/div/div/form[19]/div/div",
"Value": "ZIP_CODE_Ideal_Location",
"Description": ""
},
{
"Command": "storeText",
"Target": "xpath=//*[@id=\"app-container\"]/div/div/div[2]/div/div/div/div/div/div[3]/div[3]/div/div/div/div/form[20]/div/div",
"Value": "Radius_In_Miles",
"Description": ""
},
{
"Command": "else",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "store",
"Target": "0",
"Value": "Radius_In_Miles",
"Description": ""
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
},
Now that you have reviewed the code my question is how could I add multiple error handlers within an if_v2 statement without slowing down the code and adding a bunch of if_v2 statements. For example, I would add the following error handlers to this code:
store | 2 | !Timeout_wait
${ADDRESS_Ideal_Location}
?? I need code here to have it continue to the prompt to enter in the following data ??
Prompt | Missing Text Description Here | ${Missing_Field_Here}
Then I would repeat the above error handlers for the following statements:
${CITY_Ideal_Location}
${STATE_Ideal_Location}
${ZIP_CODE_Ideal_Location}