New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `+' for nil:NilClass #2120
Comments
What type of element is the scoping element you are searching within ? |
This is the code that causes this exception: dropdown = find('.navbar a', text: 'Some text').find(:xpath, './following-sibling::*[1]', visible: :all)
expect(dropdown).to have_css('a', visible: :all, exact_text: name) The second line is followed by the stacktrace that I pasted earlier. |
The following-sibling is creating an issue when trying to generate the path of the scoping element (because it is outside its “parent” sub tree) if no matching ‘a’ element is found. I’ll try and have a fix out later today (California time) |
@boris-petrov In the meantime you should be able to workaround the issue by combining the two finds so there is no scoping happening with something like
|
Hmmm -- this might not actually have anything to do with the |
I have not been able to reproduce this - but have put in a fix at the current point of failure - Please try branch |
Thanks for the support! This code is not run in a P.S. I'll try your fix. But, as I said, it is sporadic so we'll see how long it takes. :) |
@boris-petrov Yes it should retry (if the |
I've merged this in to master branch now -- I'm going to close this issue, we can reopen if the problem shows up again. |
Capybara 3.10.0, Selenium 3.14.1 used via JRuby.
This is very sporadic in our test suite and I'm not sure what's causing it but in any case Capybara should give an error message and not blow up with a
NoMethodError
. Please tell me how I can help more.The text was updated successfully, but these errors were encountered: