Online .iim to .json converter

Hi, have you seen this iMacros Alternative page? It contains plenty of information for migrating from iMacros to the open-source Ui.Vision.

Another option is to ask ChatGPT about Ui.Vision. I can’t test its result, but it looks reasonable. However, ChatGPT is wrong to say that Ui.Vision has no download command, of course it supports file downloads. It is just that the OnDownload command in Ui.Vision is optional. For normal downloads you do not need to add it. Only when you need some specific settings.

Anyway, here is that Chatgpt result:

I asked “convert this imacros file to ui.vision: …”

Answer:

— Start ChatGPT —
Converting an iMacros script to a UI.Vision RPA (formerly Kantu) macro involves translating the actions defined in the iMacros script into a JSON format that UI.Vision understands. Here’s how the provided iMacros script would be converted into a UI.Vision macro:

  1. Select Dropdown Option: The iMacros TAG command with TYPE=SELECT is used to select an option from a dropdown. UI.Vision uses select with xpath or id to target the element and value for the option to be selected.
  2. Wait Command: The iMacros WAIT command is directly translated to UI.Vision’s pause command.
  3. Input Text: The iMacros TAG command with TYPE=INPUT:TEXT is used for entering text into input fields. In UI.Vision, you would use type or sendKeys commands with appropriate selectors.
  4. File Download: The iMacros ONDOWNLOAD command specifies the action for a file download. UI.Vision handles downloads differently, typically through browser settings, as it doesn’t have a direct command to control downloads.
  5. Submit Form: The iMacros TAG command with TYPE=INPUT:SUBMIT is used to submit a form. In UI.Vision, this could be translated using click on the submit button.

Here’s an example of how the script might look after conversion to UI.Vision’s JSON format:

{
  "Name": "Converted_Macro",
  "CreationDate": "2024-02-29",
  "Commands": [
    {
      "Command": "select",
      "Target": "id=lbListOfReports",
      "Value": "label=1058"
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "id=txtParam1",
      "Value": "96887"
    },
    {
      "Command": "type",
      "Target": "id=txtParam2",
      "Value": "000"
    },
    {
      "Command": "type",
      "Target": "id=txtParam3",
      "Value": "999"
    },
    {
      "Command": "type",
      "Target": "id=txtParam4",
      "Value": "20231201"
    },
    {
      "Command": "type",
      "Target": "id=txtParam5",
      "Value": "20231231"
    },
    {
      "Command": "type",
      "Target": "id=txtParam6",
      "Value": "HCSA"
    },
    {
      "Command": "select",
      "Target": "id=ddFormat",
      "Value": "label=PDF"
    },
    {
      "Command": "click",
      "Target": "id=btnGenerateReport",
      "Value": ""
    }
  ]
}

Note:

  • The label or value in the select command’s Value field may need adjustment based on the actual values used in your web application.
  • UI.Vision does not support handling file downloads directly in the macro. Ensure your browser is configured to automatically handle downloads from the site or use UI.Vision’s desktop automation features to interact with the download dialog if necessary.
  • Ensure the correct targeting method (id, xpath, etc.) is used based on your page’s structure. This example uses id for simplicity, assuming the elements have unique IDs.

— End ChatGPT —

Does this work for you?