1

We have recently encountered a bug that we are able to reproduce manually in Internet Explorer, without any significant effort.

Same bug we have tried to reproduce also automatically, with WebDriver on Internet Explorer 8. However, even after looping the test and repeating it 100 times does not reproduce the bug, the test goes green.

I wonder what caused such a difference?

Possible reasons:

  • timing of GUI events in automated tests is different than in our manual tests (to fast, to slow, etc.)
  • WebDriver is operating on a different level of a browser API and than a user, making WebDriver less credible in simulating user behavior.
4
  • I know that WebDriver makes direct calls to the the browse using each browser's native support for automation, while Selenium 1 "injects" javascript functions into when the browser is loaded and then uses its javascript to drive AUT within the browser. I just wonder whether IE 8 provides such native support for test automation?
    – dzieciou
    Commented Jul 7, 2014 at 9:49
  • 2
    Same version of IE? No compatibility mode? No user-specific settings? If you pause the test and complete it manually using the exact browser window Selenium was driving, do you get the bug? Commented Jul 7, 2014 at 16:02
  • 1
    Can you give a little more information about the specific scenario that fails manually? How does it fail? What is the failing behavior?
    – Sam Woods
    Commented Jul 7, 2014 at 16:19
  • 1
    You would have to show us your test code as well, it may be an error with what you have written...
    – Ardesco
    Commented Jul 11, 2014 at 17:04

2 Answers 2

2

I have seen this sort of thing before and the problem ended up being in how the page was coded: onmouseover vs onchange in our case.

You may want to look at the the javascript events for the page, as it sounds very possible that the human interaction is causing some method to run whereas the web driver is changing objects in the DOM, and allowing web driver to push through the page without triggering the rogue javascript.

1
  • Yep, it was pretty much like what you described. Automated tests where clicking the Submit button, why real users were pressing Enter to submit a form. Both events were handled differently by the page. So we actually haven't reproduced precisely same scenario users performed. Nothing particular about WebDriver.
    – dzieciou
    Commented Apr 25, 2015 at 11:33
0

You can link up your WebDriver tests to use PhantomJSDriver and catch those pesky JavaScript errors that might cause a manual test to fail, as well.

2
  • 2
    Could you give some more information on how this works? There really isn't enough in your response to answer the OP's question.
    – Kate Paulk
    Commented Sep 3, 2014 at 10:58
  • Can you give an example how using PhantomJSDriver allows catching those JavaScript errors? Does it report those JavaScript errors? I also wonder whether PhantomJS is not yet another incarnation of Web browser, just headless ;-), so the fact I got errors in IE doesn't mean those errors will appear in PhantomJS.
    – dzieciou
    Commented Sep 4, 2014 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.