I have defined a sections
element as containing a list of individual elements to model a data table. Each Section of the Sections collection corresponds to a row of the table and each element
of the Sections definition corresponds to a column of the row.
I want to search the Sections collection for a Section which corresponds to the row with a given id and then click on an element of that row.
Unfortunately I cant find a way of searching the array of Section objects returned by PageObjectClass.<sections_name>
.
If instead I define the set of rows as elements
then PageObjectClass.<elements_name>
returns a set of Capybara elements that I can do a Capybara find
on but then I can't use the SitePrism section.element
syntax.
Using the elements.find
syntax seems to have a code smell because thus far the CSS for accessing elements has been abstracted away in the PageObject class definition - now I have to refer to the CSS for a specific element in the test code in order to click on it.
What am I missing here? How come there are so few examples of the use of data tables in SitePrism online discussion and why haven't more people hit this problem?
The only reference that I did hit upon is https://github.com/natritmeyer/site_prism/issues/91
Did anything ever come of this suggestion?