Active link control when search result is completed

I am working on a web page. I complete the operations without any problems.
My scenario works like this.

  1. Open the website
  2. Enter the value to be searched.
  3. Press the search button
  4. Wait 60 seconds
    Complete the other operations.

These work without any problems.

The problem is; Sometimes the search operation is completed in 15 seconds, sometimes in 30 seconds. and when the search operation is completed, a link is activated.

Is there a chance to check this with a command like “verifyText”?

Since the scenario repeats a lot with While, waiting with pause 60000 causes a waste of time.

Thanks.

Can you post a screenshot of this before and after activation? This helps getting ideas.


effective

inactive

First of all, thank you for your answer.

I tried to solve the problem simply with “onDownload”.

This part of my codes;

{
      "Command": "pause",
      "Target": "5000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "onDownload",
      "Target": "${Anahtar[${i}]}.txt",
      "Value": "true",
      "Description": ""
    },
    {
      "Command": "do",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "HAYIR",
      "Value": "yuklendimi",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div/div/div[2]/button",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div/div/div[2]/button",
        "xpath=//button",
        "css=#UPCSearchView > div > div.ng-scope.fa-pane-scroller > div:nth-child(2) > div.ng-scope.fa-pane-scroller > div > div.ng-isolate-scope > div:nth-child(1) > div > div.row > div > div.col-xs-12.col-sm-8 > div:nth-child(1) > div > div.form-group.form-group-sm.pull-right > button"
      ],
      "Description": ""
    },
    {
      "Command": "if_v2",
      "Target": "${!LastCommandOK}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "EVET",
      "Value": "yuklendimi",
      "Description": ""
    },
    {
      "Command": "else",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "END",
      "Description": ""
    },
    {
      "Command": "repeatIf",
      "Target": "${yuklendimi} == \"HAYIR\"",
      "Value": "",
      "Description": ""
    },

I encountered the following problem in my experiments. Sometimes the site does not respond at all after pressing the search button. It waits for a certain period of time and then reactivates the search button.

Thanks.

I solved the problem with the codes below.

{
  "Name": "ANAHTAR",
  "CreationDate": "2024-10-16",
  "Commands": [
    {
      "Command": "store",
      "Target": "true",
      "Value": "!errorIgnore",
      "Description": ""
    },
    {
      "Command": "csvReadArray",
      "Target": "Anahtar.csv",
      "Value": "Anahtar",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "0",
      "Value": "i",
      "Description": ""
    },
    {
      "Command": "while_v2",
      "Target": "${i} < ${!csvReadMaxRow}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "label",
      "Target": "Basa_Don",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "HAYIR",
      "Value": "yuklendimi",
      "Description": ""
    },
    {
      "Command": "selectWindow",
      "Target": "tab=open",
      "Value": "https://selling.channelmax.net/#/upcsearch",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div[2]/div/div/div/select",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div[2]/div/div/div/select",
        "xpath=//div[2]/div/div/div/select",
        "css=#UPCSearchView > div > div.ng-scope.fa-pane-scroller > div:nth-child(2) > div.ng-scope.fa-pane-scroller > div > div.ng-isolate-scope > div:nth-child(1) > div > div.row > div > div.col-xs-12.col-sm-8 > div:nth-child(2) > div.col-xs-5 > div > div:nth-child(1) > select:nth-child(2)"
      ],
      "Description": ""
    },
    {
      "Command": "select",
      "Target": "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div[2]/div/div/div/select",
      "Value": "label=Keyword",
      "Targets": [
        "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div[2]/div/div/div/select",
        "xpath=//div[2]/div/div/div/select",
        "css=#UPCSearchView > div > div.ng-scope.fa-pane-scroller > div:nth-child(2) > div.ng-scope.fa-pane-scroller > div > div.ng-isolate-scope > div:nth-child(1) > div > div.row > div > div.col-xs-12.col-sm-8 > div:nth-child(2) > div.col-xs-5 > div > div:nth-child(1) > select:nth-child(2)"
      ],
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div[2]/div/div/div/input",
      "Value": "${Anahtar[${i}]}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div[2]/div/div/div[2]/button",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div[2]/div/div/div[2]/button",
        "xpath=//div[2]/div/div/div[2]/button",
        "css=#UPCSearchView > div > div.ng-scope.fa-pane-scroller > div:nth-child(2) > div.ng-scope.fa-pane-scroller > div > div.ng-isolate-scope > div:nth-child(1) > div > div.row > div > div.col-xs-12.col-sm-8 > div:nth-child(2) > div.col-xs-5 > div > div.form-group.form-group-sm.full-width.mt10 > button"
      ],
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "onDownload",
      "Target": "${Anahtar[${i}]}.txt",
      "Value": "true",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "0",
      "Value": "kacinciarama",
      "Description": ""
    },
    {
      "Command": "do",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "HAYIR",
      "Value": "yuklendimi",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div/div/div[2]/button",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"UPCSearchView\"]/div/div[3]/div[2]/div[3]/div/div/div/div/div/div/div/div/div/div[2]/button",
        "xpath=//button",
        "css=#UPCSearchView > div > div.ng-scope.fa-pane-scroller > div:nth-child(2) > div.ng-scope.fa-pane-scroller > div > div.ng-isolate-scope > div:nth-child(1) > div > div.row > div > div.col-xs-12.col-sm-8 > div:nth-child(1) > div > div.form-group.form-group-sm.pull-right > button"
      ],
      "Description": ""
    },
    {
      "Command": "if_v2",
      "Target": "${!LastCommandOK}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "EVET",
      "Value": "yuklendimi",
      "Description": ""
    },
    {
      "Command": "else",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return Number(${kacinciarama})+1",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "gotoIf_v2",
      "Target": "${kacinciarama}==5",
      "Value": "Basa_Don",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "END",
      "Description": ""
    },
    {
      "Command": "repeatIf",
      "Target": "${yuklendimi} == \"HAYIR\"",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "selectWindow",
      "Target": "tab=close",
      "Value": "https://selling.channelmax.net/#/upcsearch",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return Number(${i})+1",
      "Value": "i",
      "Description": "Increase by one to read the next line. "
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }
  ]
}

After checking 5 times whether the “onDownload” command was executed, I renewed the entire cycle.

Maybe someone else needs it like me.

Thanks.