Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Examples


Code Block
languagejs
collapsetrue
{
  "Name": "walmart-customizable",
  "CreationDate": "2021-5-4",
  "Commands": [
    {
      "Command": "store",
      "Target": "first",
      "Value": "firstName",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "last",
      "Value": "lastName",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "1970",
      "Value": "birthYear",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "Dec",
      "Value": "birthMonth",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "1",
      "Value": "birthDay",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "demo@jmehan.com",
      "Value": "email",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "6135555555",
      "Value": "phone",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // k1s2t8",
      "Value": "city",
      "Description": "home"
    },
    {
      "Command": "comment",
      "Target": "store // Kemptville",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // renfrew",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // kanata",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "ottawa",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Gloucester",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // K1J 9L3",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Rockland",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // K4K 0B5",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Pembrook",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // K8A 8P7",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Ottawa S",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store //  K1V1J5",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // Brampton",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // Vaughan",
      "Value": "city",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // 1",
      "Value": "numOfSites",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "4",
      "Value": "numOfSites",
      "Description": ""
    },
    {
      "Command": "open",
      "Target": "https://portal.healthmyself.net/walmarton/forms/Dpd",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=//*[@id=\"sq_101\"]/div[2]/div[2]/label/input",
      "Value": "false",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"sq_101\"]/div[2]/div[2]/label/input",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=//*[@id=\"sq_102\"]/div[2]/div[2]/label/input",
      "Value": "false",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"sq_102\"]/div[2]/div[2]/label/span",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"app\"]/div[4]/div[2]/div/div/div[2]/div/div/div/div/form/div[2]/div/div[2]/input[3]",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "xpath=//*[@id=\"app\"]/div[4]/div[2]/div/div/div[2]/div/div/div[2]/h2/div/a/strong",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "linkText=First dose of COVID-19 vaccination »",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=ajax",
      "Value": "${city}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"content\"]/div/div[4]/div/div/div/div[2]/div/div/div[3]/div/div/div/div/div/div/div/div/div[2]/div/div/div[3]/ul/li/span/span",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "do",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "0",
      "Value": "i",
      "Description": ""
    },
    {
      "Command": "while_v2",
      "Target": "${i} < ${numOfSites}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "executeScript // return \"start\" + (Number(${i}) + Number(1)) + \"end\"",
      "Value": "test",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "store // ${i++}",
      "Value": "test",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "prompt // ${test}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "First",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "if_v2",
      "Target": "${i} == 0",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"bookingLocationListContainer\"]/div/div/div/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "elseif",
      "Target": "${i}==1",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Second",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"bookingLocationListContainer\"]/div[2]/div/div/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "elseif",
      "Target": "${i}==2",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Third",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"bookingLocationListContainer\"]/div[3]/div/div/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "elseif",
      "Target": "${i}==3",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Fourth",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"bookingLocationListContainer\"]/div[4]/div/div/div/div/div/div/div/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "1000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "executeScript",
      "Target": "return document.body.innerHTML.search(\"At this time there are no appointment slots available\");",
      "Value": "NoSlots",
      "Description": ""
    },
    {
      "Command": "if_v2",
      "Target": "${NoSlots}==-1",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "break",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Click Back",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"content\"]/div/div[4]/div/div/div/div[2]/div/div/div[3]/div/div[2]/div/button",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return Number (${i}) + 1;",
      "Value": "i",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "repeatIf",
      "Target": "${NoSlots}!=-1",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "executeScript",
      "Target": "var audio = new Audio(\"https://www.myinstants.com/media/sounds/jeopardy.mp3\"); audio.play();",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//div[2]/div/div/a",
      "Value": "",
      "Targets": [
        "linkText=Book now:  May 3, 2021 @ 8:00 AM EDT »",
        "xpath=//*[@id=\"content\"]/div/div[4]/div/div/div/div[2]/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div[2]/div[2]/div/div/a",
        "xpath=//div[2]/div/div/a",
        "css=#content > div > div:nth-child(4) > div > div > div > div.panel-body > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > div > div:nth-child(2) > div > div > div > div > div > div > div:nth-child(2) > div.col-sm-9 > div > div > a.btn.btn-default.wrap"
      ],
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=sq_100i",
      "Value": "${firstName}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=sq_101i",
      "Value": "${lastName}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=//*[@id=\"sq_102\"]/div[2]/div[2]/div/div/input",
      "Value": "${birthYear}",
      "Description": ""
    },
    {
      "Command": "select",
      "Target": "xpath=//*[@id=\"sq_102\"]/div[2]/div[2]/div/div[2]/select",
      "Value": "label=${birthMonth}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=//*[@id=\"sq_102\"]/div[2]/div[2]/div/div[3]/input",
      "Value": "${birthDay}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=sq_103i",
      "Value": "${email}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=//*[@id=\"sq_104\"]/div[2]/div[2]/input",
      "Value": "${phone}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"sq_106\"]/div[2]/div[2]/label/span",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"sq_107\"]/div[2]/div[2]/label/span",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"content\"]/div/div[4]/div/div/div/div[2]/div/div/div[3]/div/div/div[2]/div[2]/div[2]/div/div/div/form/div[2]/div/div[2]/input[3]",
      "Value": "",
      "Description": ""
    }
  ]
}

...