class RailsJsdom::Element

An element on the page, returned by TestHelper#find, TestHelper#all, TestHelper#first, TestHelper#find_field, TestHelper#find_button and TestHelper#find_link.

An element refers to a node in the live page. Actions on it settle the page like the TestHelper actions. Once the node leaves the page, for example after a navigation, using the element raises RailsJsdom::Error.

item = find(“#cart li”, text: “Mug”) item.find_button(“Remove”).click assert_equal “2”, find_field(“Quantity”).value