I have a test case, most of my other pages have at least one field that is just straight text and can be found using:
page.find(\"tr\", text: \"What I filled
If you want to click on the p
element, you can easily do it with css selector or xpath:
find(:css, 'the css selector of your p element').click
or
find(:xpath, 'the xpath of your p element').click
For example
find(:css, 'body > div.layout > div > button').click
If you are using Chrome, you can easily find them by inspecting your element, right click on his code and copying the css selector or the xpath.