-
Notifications
You must be signed in to change notification settings - Fork 105
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 can we simulate typing? #59
Comments
This is a great question, and it's definitely something that we've been thinking about quite a bit. The philosophy of the project is heavily centered around the idea of things being implemented in vanilla JavaScript using existing browser APIs, so simulating the JavaScript key events is really the closest that we'll be able to get. My understanding is that this should be realistic enough for the vast majority of testing and web scraping tasks, but I would be curious to hear about edge cases where it wouldn't be if you're aware of any. Simulating key presses like this manually is clearly a bit cumbersome, and our intention isn't that each user should be hacking something like this together themselves. We have some higher-level tooling in the works that will facilitate these sort of interactions, and you can expect an update in the near future that provides similar functionality to that of the |
By any chance has any update of this topic been released ? Kind Regards |
I'm really excited about this project. A potential gotcha was pointed out in the hn thread, so I thought I'd take the conversation here since that thread seems to have lost momentum.
How can we simulate typing using remote-browser? Technically we can set an input element's
value
to something, or createkeypress
,keydown
, etc. events. But it seems that webdriver takes a different approach that's closer to true user input. I don't know how webdriver does it, but the use case is a website that, say, auto-formats a phone number or credit card number as you type it. Sometimes these don't work when you set thevalue
of the input field. Another example is JS-based validations. Thetype
method on puppeteer and selenium seem to fool the browser into thinking a user is typing. How might we achieve this in remote-browser?The text was updated successfully, but these errors were encountered: