Simple script from imacros

i just moved from imacros into here. I had something very simple, can someone help me out on what/how to move to here

SET !TIMEOUT_STEP 0
SET !ERRORIGNORE YES
TAB T=1
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Internal/Exam/Create ATTR=ID:exam-search-button
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Internal/Exam/Create ATTR=TXT:Bestil
SET !ERRORIGNORE NO
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Internal/Exam/Create ATTR=TXT:Bestil CONTENT=EVENT:FAIL_IF_FOUND
SET !ERRORIGNORE YES
TAB T=2
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Internal/Exam/Create ATTR=ID:exam-search-button
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Internal/Exam/Create ATTR=TXT:Bestil
SET !ERRORIGNORE NO
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Internal/Exam/Create ATTR=TXT:Bestil CONTENT=EVENT:FAIL_IF_FOUND

You can do this automation with ui vision, it’s quite simple.
You don’t need the Imacros code, simply with ui vision you record the new commands and create the new code.
It’s a fairly simple job and ui vision has many more commands than imacros.

The iMacros TAG command is best replaced by re-recording the part in Ui.Vision, just as @newuserkantu said. Usually it gets replaced by CLICK and TYPE-. UiVision will find the correct locators for you.

For most other commands the iMacros commands table gives you a good alternative for each iMacros command.

For example, iMacros

  • SET !TIMEOUT_STEP 0
  • is in Ui.Vision Store | 0 | !TIMEOUT_WAIT

Another example: iMacros

  • TAB T=1
  • is in Ui.Vision selectWindow | TAB=1

TAG POS=1 TYPE=BUTTON FORM=ACTION:/Internal/Exam/Create ATTR=TXT:Bestil CONTENT=EVENT:FAIL_IF_FOUND

For iMacros’ FAIL_IF_FOUND I found that assertelementNOTpresent does the same in Ui.Vision.

Test macro:

{
  "Name": "FAIL_IF_FOUND",
  "CreationDate": "2023-3-27",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://ui.vision/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "assertElementPresent",
      "Target": "xpath=//div/img",
      "Value": "",
      "Description": "Check that element is on page"
    },
    {
      "Command": "assertElementNotPresent",
      "Target": "xpath=//div/imgXXXXXX",
      "Value": "",
      "Description": "Same as EVENT:FAIL_IF_FOUND in iMacros - Check that element is NOT on page."
    }
  ]
}
1 Like

Hi, did you set the replay speed to FAST?

rpa speed