Skip to content

Capybara randomly not able to find elements #141

Closed
@mbajur

Description

@mbajur

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions