Home > Back-end >  Python Web browser click listener
Python Web browser click listener

Time:11-29

Is there any packages or ways to detect what is being clicking in a web browser? I mean get tag/xpath from the web browser (of what is being clicked)? To afterwards find it via selenium or similar?

Or even with to determine what it is with the coordinates of the mouse click.

Like the codegen in Playwright or similar, like a form of listening.

Hope this makes sense.

CodePudding user response:

We could add window listener with JavaScript using driver.execute_script to listen to any clicks, and then call function xpath as provided in enter image description here

  • Related