Closed steadylearner closed 4 years ago
The ElementNotInteractable error comes directly from selenium so it's likely that the particular element you are attempting to send keys to (the searchInput
field) is not currently interactable.
Looking at your site, the search input field isn't actually visible to the user until they click the search button first. So that is what your code needs to do. You will find this easier if you stick an id on the search button (one of the span elements I think). Then issue a click() to that element, and then the search input element should be interactable. Let me know how you go with that.
Not sure why it would have a long delay, I suspect that might be related to the implicit wait time used. I set it to 30s by default but you can change it in your code to suit your preference. See the set_*_timeout() methods on WebDriver.
I forget that I had to click it first. Sorry, it's been a time that I used it and wanted to use with your crate because I find it very interesting.
I will test it again later and close the issue.
Thanks for the fast response.
I was testing with async API of this crate with my React frontend at www.steadylener.com
What I want is very simple
The code I used is similar to this.
But, after a long wait, it shows this error.
I don't use Chrome browser, but it is installed in my machine and used it to follow the example easily.
My doubts are
I want to test Selenium with React or other single page apps. But, I haven't used it for a long time. If I missed something, please let me know.