I am new to page-objects. And I want to be able to create nested page
objects, but can not seem to figure out how to do so.
currently I have some objects created like this:
li(:min_amount_due, ‘desktop-minimum’)
but for our mobile section it comes in on a slider and i cant access it
the same way.
I have tried:
li(:mobile_min_amount_due, ‘slider-minimum’)
but when I run our ruby code it says that the Chrome driver can not find
the object.
but when I do the following:
browser.form(:id, ‘sliderWindowForm’).li(:id, ‘slider-minimum’)
the object is found.
an example of the web page source (shortened view-ability):
...
<button type="button" ...
- <a...
- <a...
- <a...
- ...