jquery event handler that communicates with selenium api
I have a java selenium application which needs to be aware of certain events. This means that the java application waits for user input made in an open browser window. For example if i want to send a message to the java app everytime the user clicks on an element, so that i can do something with that information, how can i achieve that?
Update
I want to augment a website by creating a recorder application which tracks all real user actions in order to automate them afterwards.
Update 2
What i need is basically the possibility to perform a callback function in Java by triggering it with JavaScrip开发者_如何学Ct code.
Selenium interacts with the web browser in the same way a human does. So, if I've understood your question correctly:
Step 1: Code a web page with a text box and a button that submits the text to the java application.
Step 2: Create a selenium test case (maybe with help from seleniumide) that opens a browser, enters some text, and clicks the button
Ok, as far as i see, it is not possible. Either i need a webserver which gets AJAX requests and redirects the data to the Java application. Or i have to periodically pull the data from the current web page. I followed the second idea.
精彩评论