How to find a variable with rspec tests using page.find

依然范特西╮ 提交于 2019-12-01 14:18:59

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!