Hey all,
I'm not really a front end developer, so I'm not too clear on what exactly is going on here, but I"ll explain whats going on.
I had a suite of tests that worked fine testing a highly javascript based app. Our front end developer switch event handling around to something he called "touch events" because they were 300ms faster on mobile devices. This is when the tests started failing.
Basically, I have a link "#submitName", that is responsible for moving elements on the page around. The javascript that is bound to it is as follows:
$(document.body).on(R.touchEvent, "#submitName", this.submitName.bind(this));
where there is a function submitName() that does the heavy lifting.
I asked the front end dev, and he asked me if "window.ontouchstart" was supported in the testing driver, and if it was, that might cause problems.
So I stuck a debugger in my tests prior to the error and ran:
page.evaluate_script("typeof(window.ontouchstart)")
=> "object"
I checked in the console of actual Chrome browser:
"undefined"
And I checked in Selenium and Chrome-Selenium webdrivers:
"undefined"
All my tests pass in Selenium and Chrome-Selenium drivers.
I'm running:
capybara (1.1.2)
capybara-webkit (0.12.1)
Any advice on what's going on here?
Thanks!
Pete