'File size cannot be determined' error -> How to run macro2 from macro 1 when both are inside different folder

2022-01-11 15_49_21-Untitled - Paint
Folder structure
How to run a macro inside another macro, while both are in 2 different folders?
I would like to run Macro 2.1 inside Macro 1, all the time I am getting an error message that ‘File size cannot be determined’

Macro 1 x line
run: Folder2/folder2.x/Macro2.1 (this one is working if macro 1.1 is under the main folder)
Note: It works fine when macro 1.1 is not inside one folder but under the main folder

Thanks in advance!

run | MainFolder/Folder 2/Folder 2.x/Macro 2.1

If your main folder your mentioned is the main directory tree, then start the path with Folder 2

Same error is also if I start with mainFolder

@kos

Is this on Windows, Mac or Linux?

Are you using browser storage or hard-drive storage?

@Plankton Is windows and I am using hard-drive storage

To explain:

  • You must have / at the start if you want to use an absolute path, counted from the XModule/macros root folder.

  • Without / it is a relative path, counted from the location of the current macro. And then, if the macro is not found, you get the (confusing) File size cannot be determined error. We will improve that error message.

Main macro:

{
  "Name": "tabkey",
  "CreationDate": "2022-1-13",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://ui.vision/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "linkText=Contact Us",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "run",
      "Target": "/b1/b2/b3/tabkeypart2",
      "Value": "/ means absolute path from within XModule ROOT folder",
      "Description": ""
    },
    {
      "Command": "run",
      "Target": "/a1/a2/a3/tabkeypart3",
      "Value": "another absolute path",
      "Description": ""
    },
    {
      "Command": "run",
      "Target": "a3/tabkeypart3",
      "Value": "No / means relative path to current macro",
      "Description": ""
    }
  ]
}

Just to clarify, that should be

run | /MainFolder/Folder 2/Folder 2.x/Macro 2.1

(added missing / )

Thanks for clarifying that.
However, at least on Windows in browser storage mode my macros with the run command are like this:

run | FolderName/MacroName

The main macro itself is in the main directory tree though and not in a folder. Is that why it works?

@admin Thanks for your response, but for me is still not working
a1 and b1 should be inside the main folder
I have tried:
/celum_drive_e2e/common/celum-drive/celum_login_user3
/common/celum-drive/celum_login_user3

and I have still the same error

I tested with this and it worked. The tree is similar to you.



Maybe showing your full macro should help a lot.

It works also for me, with / at the start (I was writing main folder wrong with _ instead of - )
Thanks everyone, it helped me a lot

1 Like