Check element visibility that is visible for less than a second in Rails Capybara
问题 I am trying to write an integration test in which I must check the visibility of an element on button click. The code works perfectly in one machine and failing in the other. The element is displayed until the data comes from the backend. So its visibility depends on the speed of the machine also. Is that the problem? This is the code: assert page.has_css?('#my_element_id') assert find('#my_element_id', visible: true) But I am getting an error: expected false to be truthy . Is there any other