Answer the question
In order to leave comments, you need to log in
How does the JS code of an extension (plugin) interact with Selenium?
Good afternoon.
Wrote a small extension for Chrome. The plugin parses the page and, under certain circumstances, you need to click on some DIV element. I did both with the help of dispatchEvent and with the help of jQuery. I read on several resources that you can click, but the click as such will not happen.
"Manual" triggering (generation) of an event does not create by default an action associated with this event. For example, programmatically firing a focus event on an element does not mean it will receive focus, a manually fired submit event will not cause the form to submit data (you should use the form's submit method), a fired keypress event does not mean the character will appear in the input field, programmatically clicking on a link does not activate the transition on it, etc. Such restrictions are necessary for security purposes and to prevent scenarios of simulating user experience and interaction with the browser.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question