Help to convert imacros macro to UI.Vision code

It looks like iMacros is getting turned off by Chrome these days.

But no worries, there are many former iMacros users in this RPA forum, so we can help.

Some questions first:

you need custom xpaths

and this part worked in imacros? If so, can you post the imacros lines reponsible for this? Maybe I can “translate” them to Ui.vision code.

Hey, I got this to work :slight_smile:

{
  "Name": "Upload Events-Final",
  "CreationDate": "2025-4-6",
  "Commands": [
    {
      "Command": "csvRead",
      "Target": "Book3.csv",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "open",
      "Target": "${!COL16}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "1000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "${!COL1}",
      "Value": "!csvLine",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtArticleTitle",
      "Value": "${!COL1}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtEPSummary",
      "Value": "${!COL2}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtArticle",
      "Value": "${!COL3}",
      "Description": ""
    },
    {
      "Command": "select",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:ddlCityList",
      "Value": "label=${!COL5}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtAddress",
      "Value": "${!COL6}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtWebUrl",
      "Value": "${!COL7}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtContactInfo",
      "Value": "${!COL8}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtCost",
      "Value": "${!COL9}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtEventSDate",
      "Value": "${!COL10}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtTiming",
      "Value": "${!COL11}",
      "Description": ""
    },
    {
      "Command": "select",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:ddlCategoryList",
      "Value": "label=${!COL12}",
      "Description": ""
    },
    {
      "Command": "select",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:ddlAudienceList",
      "Value": "label=${!COL13}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "name=_ctl0:_ctl3:_ctl0:_ctl0:txtContactEmail",
      "Value": "${!COL14}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_thePhotoControl",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_thePhotoControl",
      "Value": "${!COL15}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_txtEventEDate",
      "Value": "${!COL17}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=${!COL18}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_btnPreview",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "waitForElementVisible",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_btnPreviewSave",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "3000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_btnPreviewSave",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "waitForElementVisible",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_btnFinished",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "3000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=_ctl0__ctl3__ctl0__ctl0_btnFinished",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "open",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"_ctl0__ctl3__ctl0__ctl0_lblWNE_Events\"]/table/tbody/tr/td[2]",
      "Value": "!csvLine",
      "Description": ""
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"_ctl0__ctl3__ctl0__ctl0_lblWNE_Events\"]/table/tbody/tr[2]/td[2]",
      "Value": "!csvLine",
      "Description": ""
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"_ctl0__ctl3__ctl0__ctl0_lblWNE_Events\"]/table/tbody/tr[3]/td[2]",
      "Value": "!csvLine",
      "Description": ""
    },
    {
      "Command": "storeAttribute",
      "Target": "xpath=//a[contains(text(),'Click here to View')]@href",
      "Value": "!csvLine",
      "Description": ""
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"_ctl0__ctl3__ctl0__ctl0_lblWNE_Events\"]/table/tbody/tr[5]/td[2]",
      "Value": "!csvLine",
      "Description": ""
    },
    {
      "Command": "csvSave",
      "Target": "tracker.csv",
      "Value": "",
      "Description": ""
    }
  ]
}
1 Like