First, sorry for the delay.
It would be a really interesting idea to have a better integration of
Pyccuracy and the browser JavaScript environment; but to get there we
have to pass through the browser, respecting its way to access
JavaScript, as explicited by your example. This is a tricky point, since
each browser implements its own JavaScript access means, and not all
browsers have JavaScript support - like the ones that don't rely on a
GUI browser and just parse the document from the HTTP response -.
Coding a method to identify Ajax states by the way you mentioned ads
even more coupling, because now SeleniumDriver will have to know which
JS library the UI code is using - jQuery, in your case -. Maybe that
could be a job to something like a jQuerySeleniumDriver, though, or we
could make something like a new JavaScriptedDriver interface that ads
some more methods concerning to JavaScript.
Anyway, my point is: implementing Ajax-related code in the
SeleniumDriver would be too much responsibility for it to manage, but
there can be better choices to implement it - can you point us other
ways to accomplish this? What about forking the repo and sending a pull
request? ;-)
Thanks for the help with Pyccuracy, Alex! Let's make it better together! :-)
Diogo
--
Diogo Baeder - desenvolvedor web
http://diogobaeder.com.br
Right now I can't think of a clean and decoupled way to implement that,
so I'm curious to see what you come up with. :-)
Thanks for the collaboration!
Diogo
--