Hi – apologies for a bot of a generic question… We are automating our UI testing by using Selenium Web Driver (v2.24.1), and it works like a dream with the exception on IE9.
We are doing part of client side functionality by hiding/showing UI controls via addClass and removeClass jQuery methods. addClass and removeClass jquery methods append (or remove) classes from DOM. This way, we can do Selenium DOM iteration looking for those changes in order to trigger actions…
Our problem is that those DOM changes are not reflected in IE9 – e.g. functionally everything is working correctly on IE, but the “dom is static”, thus Selenium cannot reckognize some panel is shown or hidden…
So, the question:
1) Is there a way to reflect the addClass and removeClass in IE9 in a dynamic manner?
2) Should we possibly monitor/capture changes in a different way? (Possibly assigning some kind of event listeners on the components that are causing us problem?)
Hope this question is not too vague – this is not an issue with one particular component, but I think it is more down to the way we are trying to use Selenium in a generic way across multiple products…
Let me make sure I understand properly:
If above is the case perhaps you have run into a bug with selenium and IE9?
Here is a possible quick work around: execute JavaScript via Selenium after the DOM is in state “B” (or to check if it has reached state “B”) and return the results back to selenium: