teampoltergeist / poltergeist

A PhantomJS driver for Capybara

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Capybara::Poltergeist::BrowserError

cohki0305 opened this issue · comments

I got an error by following code.
when I check the screenshot, I found the element which has the ID.
In screenshot, page design was different from the page which I see in localhost.

Also, I got same error when I use have_content.

Please tell me a solution.

#spec
page.save_screenshot "tmp/capybara/screenshot-#{DateTime.now}.png"

find("#ID").trigger('click')
Capybara::Poltergeist::ObsoleteNode:
       The element you are trying to interact with is either not part of the DOM, or is not currently visible on the page (perhaps display: none is set). It's possible the element has been replaced by another element and you meant to interact with the new element. If so you need to do a new 'find' in order to get a reference to the new element.

     # ------------------
     # --- Caused by: ---
     # Capybara::Poltergeist::BrowserError:
     #   There was an error inside the PhantomJS portion of Poltergeist. If this is the error returned, and not the cause of a more detailed error response, this is probably a bug, so please report it.
 

ENV

rails 5.1.1
ruby 2.4.1
poltergeist (1.15.0)

Sorry, It was my mistake.
I was finding the elements within other area.