No internet connection
  1. Home
  2. Macro and Script Help

RX10 File>Export... dialog does not seem to appear to .elementWaitFor function

By Brenden @nednednerb
    2022-12-04 20:42:52.044Z

    Title

    RX10 File>Export... dialog does not seem to appear to .elementWaitFor function

    What do you expect to happen when you run the script/macro?

    The script is supposed to cycle through the open tabs in RX10, using File>Export... and waiting for dialogs and using default settings/location. Can be done easily with keyboard automation, but trying to use script.

    Are you seeing an error?

    "Element was not found or removed after waiting 2000 ms (RX-Export-Wav: Line 17) in the SF log for my script.

    What happens when you run this script?

    So far, it seems to open the export dialog, but the .elementWaitFor function seems to fail on line 17 and the timeout message appears, and the next step, pressing the OK button does not run.

    How were you running this script?

    I used a keyboard shortcut within the target app

    How important is this issue to you?

    4

    Details

    {
        "inputExpected": "The script is supposed to cycle through the open tabs in RX10, using File>Export... and waiting for dialogs and using default settings/location. Can be done easily with keyboard automation, but trying to use script.",
        "inputIsError": true,
        "inputError": "\"Element was not found or removed after waiting 2000 ms (RX-Export-Wav: Line 17) in the SF log for my script.",
        "inputWhatHappens": "So far, it seems to open the export dialog, but the .elementWaitFor function seems to fail on line 17 and the timeout message appears, and the next step, pressing the OK button does not run.",
        "inputHowRun": {
            "key": "-Mpfwh4RkPLb2LPwjePT",
            "title": "I used a keyboard shortcut within the target app"
        },
        "inputImportance": 4,
        "inputTitle": "RX10 File>Export... dialog does not seem to appear to .elementWaitFor function"
    }

    Source

    // log(sf.ui.frontmostApp.activeBundleID);
    sf.ui.izotope.appActivateMainWindow();
    sf.ui.izotope.mainWindow.invalidate();
    let izoTopeExport = sf.ui.izotope.mainWindow.groups.whoseDescription.is("ExportPanel Module Wrapper").first
    
    // loop repeatForTabs file exports
    var repeatForTabs = prompt("How many tabs would you like to process?");
    for(let i=0; i<+repeatForTabs; i++) {
    
    // file export script
    sf.ui.izotope.menuClick({
        menuPath: ["File","Export..."],
    });
    
    // Trying to use .elementWaitFor and .elementCLick to hit "OK" on first dialog and save on second
    // first dialog 
    izoTopeExport.elementWaitFor();
    izoTopeExport.groups.whoseDescription.is("ExportPanel Module Wrapper Footer Background").first.buttons.whoseDescription.is("OK").first.elementClick();
    
     sf.wait({
        intervalMs: 125,
    });
    /* sf.keyboard.press({
        keys: "return",
    }); */
    
    // second dialog
    sf.ui.izotope.windows.whoseTitle.is("Export File").first.splitGroups.first.elementWaitFor();
    sf.ui.izotope.windows.whoseTitle.is("Export File").first.buttons.whoseTitle.is("Save").first.elementClick();
    
    sf.wait({
        intervalMs: 125,
    });
    /* sf.keyboard.press({
        keys: "return",
    });
    */
    
    // proceed to next file
    sf.ui.izotope.menuClick({
        menuPath: ["Window","Next File"],
    });
    
    }
    

    Links

    User UID: hMEBO84NZbXqVbqYJzU5ZyTNHGN2

    Feedback Key: sffeedback:hMEBO84NZbXqVbqYJzU5ZyTNHGN2:-NITs8YJVZAaGCVFEvK5

    Feedback ZIP

    • 0 replies