facebookarchive / huxley

A testing system for catching visual regressions in Web applications.
Apache License 2.0
4.07k stars 286 forks source link

Playback error when reloading a page #10

Open robfe11 opened 11 years ago

robfe11 commented 11 years ago

Hi,

I have a page with a button, when user presses it, it makes a backend AJAX call, then refreshes the page on success. I want to record the before and after, however, the following error came up:

huxley.errors.TestError: Could not call window._getHuxleyEvents(). This usually means you navigated to a new page, which is currently unsupported.

I understand why it's happening, but is it possible for huxley to navigate between pages, and continue recording?

Rob

petehunt commented 11 years ago

So this is nontrivial because we need to detect when the user is changing pages (easy), persist the old events list (easy via localstorage) and insert javascript into the new page (harder). I think there are a few hacky ways to do this, like adding a console command to inject JS, but I haven't come up with anything better. Any WebDriver ninjas out there have any ideas?

petehunt commented 11 years ago

cc @pivotal-casebook

jessicard commented 10 years ago

I commented on https://github.com/facebook/huxley/pull/12, but was curious if this was dead, or if there's still a chance https://github.com/facebook/huxley/pull/12 could be finished/merged in to fix this? This feature would be quite nice.