rod
rod copied to clipboard
Upload file on Managed Launcher?
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 ?