stale element reference: element is not attached to the DOM - Need to wait until element/ elements visible/enabled using SitePrism
#find
takes a selector type and parameters of some type, it does not take an element from the page. Since (after a quick look at the source) it doesn't appear there is anyway to access the parameters specified in your element :btn_element, ...
declaration from site_prism, there is no way for you to call #find
without retyping the selector. That being said there really should be no difference between the @home.wait_until_btn_element_visible
and what you state you want to do since site_prism ends up calling Capybaras find with visible: true
specified. The only difference is that site_prism uses its own wait timeout, so you might want to try increasing SitePrism::Waiter.default_wait_time or specifying longer wait timeout in the wait_until_xxx call
@home.wait_until_btn_element_visible(10)