jonleighton/poltergeist — Issue #39: Index elements by page id as well as node id
Author: jonleighton
Created: 2012-03-05 12:53:02+00:00
State: open

Consider the following:

``` ruby
visit '/foo'
el = find('#bar')
page.execute_script "window.location = 'http://example.com/'"
el.text
```

The call to `el.text` will still think we're on the same page, resulting in a ReferenceError in the Javascript code. We should handle this by indexing elements by a page id as well as a node id.