Skip to content

Capybara randomly not able to find elements #141

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
mbajur opened this issue Dec 18, 2020 · 5 comments
Closed

Capybara randomly not able to find elements #141

mbajur opened this issue Dec 18, 2020 · 5 comments

Comments

@mbajur
Copy link

mbajur commented Dec 18, 2020

First of all - i'm not sure if that's a proper repo to report that issue, if not please forgive my ignorance and close this issue.

I have a pretty decent specs suite for one of my apps and there is one place that gives me headaches as it randomly fails on CI - like 8/10 of times. There is nothing really special about this check. It's about clicking a link:

    sign_in_as(create(:user))

    visit '/'
    click_link 'Projects'
    expect(page).to have_link '+ Create new project'
    find_link('+ Create new project').click

The error rspec gives me is

Ferrum::NodeNotFoundError:
  Could not find node with given id

I tried putting sleep before that line but it didn't helped neither. Also, i have capybara-screenshot installed and i can see that this link is there every single time this test fails so i have really no idea what's going on in here. My stack:

  • ruby 2.7.0
  • capybara 3.9.0
  • ferrum 0.9
  • cuprite 0.11

any tips or dirty hacks much appreciated!

@route
Copy link
Member

route commented Dec 21, 2020

If you turn on debug log and attach it here or send it to my email I can take a look, otherwise it's fortune telling.

@georf
Copy link

georf commented Jan 22, 2021

I think you got the same problem. It should be fixed with #125

@mbajur
Copy link
Author

mbajur commented Jan 22, 2021

Sorry for not responding, i'm not really able to provide any debug logs right now / in the nearest future so i guess this issue can be closed till then.

@route route closed this as completed Jan 22, 2021
@MatheusPoliCamilo
Copy link

I'm having the same problem here, failing randomly with the error:

 Ferrum::NodeNotFoundError:
       Could not find node with given id
  • Ruby 3.0.3
  • Capybara 3.36.0
  • Ferrum 0.11
  • Cuprite 0.13

@route
Copy link
Member

route commented Apr 18, 2022

@MatheusPoliCamilo you better send logs and the test, otherwise it's not useful at all. Usually this happens in a bad written test, but there might be a lot of reasons.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants