Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload file on Managed Launcher? #1030

Open
jackbit opened this issue Mar 22, 2024 · 2 comments
Open

Upload file on Managed Launcher? #1030

jackbit opened this issue Mar 22, 2024 · 2 comments
Labels
enhance New feature or request question Questions related to rod

Comments

@jackbit
Copy link

jackbit commented Mar 22, 2024

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 jackbit added the question Questions related to rod label Mar 22, 2024
Copy link

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.114.8

generated by check-issue

@ysmood ysmood added the enhance New feature or request label Mar 22, 2024
@ysmood
Copy link
Collaborator

ysmood commented Mar 22, 2024

For now, you can create a file server on the managed docker container to accept remote files.

cdp doesn't have this kind of api yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance New feature or request question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants