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

How to handle file picker? #209

Open
zevtyardt opened this issue Apr 11, 2024 · 4 comments
Open

How to handle file picker? #209

zevtyardt opened this issue Apr 11, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@zevtyardt
Copy link

I am currently working with this library and I am facing some difficulties in handling the file picker functionality. I would like to know the proper way to handle the file picker using this library. Could someone please provide guidance or code examples on how to achieve this? Thank you in advance for your help!

@stevepryde
Copy link
Owner

This is a difficult one. As far as I know, you can't automate this with webdriver/selenium or with the browser automation tools. The file picker is usually an OS-level window so it's kind of "outside" the browser. I've heard that you can use tools like autoit on Windows, but outside of that I don't really have any suggestions (and I've never used autoit).

@zevtyardt
Copy link
Author

I use headless mode because my device cannot display the GUI window. I found a function in puppeteer node-js that can handle the file picker

https://pptr.dev/api/puppeteer.page.waitforfilechooser

Does this library have this kind of function?

@stevepryde
Copy link
Owner

I was not aware of this. Puppeteer (and others) tend to just wrap Chrome DevTools Protocol, which thirtyfour can also access (there are some CDP functions exposed already).

I don't know how it's done in puppeteer but I'd be interested in finding out. If it's using CDP then it may be possible in thirtyfour too, with some work.

@zevtyardt
Copy link
Author

ok, thanks for the answer, I'm really looking forward to that feature

@stevepryde stevepryde added the enhancement New feature or request label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants