rod icon indicating copy to clipboard operation
rod copied to clipboard

Upload file on Managed Launcher?

Open jackbit opened this issue 5 months ago • 2 comments

Rod Version: v0.114.7 Example script:

func UploadFile(launcherURLstring, localFilePath string) {
    browser := launcher.MustNewManaged(launcherURL).StartURL("about:blank").NoSandbox(true).MustConnect()
    page := browser.MustPage(`http://local.host/upload-form`)
    page.MustElementX(`//input[@type="file"]`).MustSetFiles(localFilePath )
}

The script above is working well, but the file is invalid. Because I think the remote browser can not select local file. Any idea how to handle it ?

jackbit avatar Mar 22 '24 04:03 jackbit