Feature request - Add thead/tbody elements to table
Please add thead_element and tbody_element. This is useful for getting just the data rows or the header row from a table.
Upvote!
As long as there isn't a specific behavior needed for these elements, they can be defined like this:
element(:my_header, :theader, :id => 'theader_id')
element(:my_body, :tbody, :id => 'tbody_id')
and as long as you have a good identifier, any element can be identified as
element(:my_element, :element, :id => 'my_element_id')
@daneandersen Where is this functionality defined? What exactly are :theader and :tbody in this case?
Edit: Ah never mind, I thought you were referencing the element() method as being any element method, not this one. I understand now.
no, I was specifically referencing the linked method. It takes a tag of the specific type of element you are looking for. That's what the symbol is. In those three lines of code, the :tbody, :thead, and :element are saying you're looking for a <thead> element, a <tbody> element or any element, respectively.
@daneandersen it's not the same. I've seen so many places where these elements so required (table in table or huge tables that are generates dynamically).
@Evmorov, is there a specific set of behaviors you're looking to get? The element method will get you the element to interact with, but obvious doesn't give you any other behaviors. Are you wanting something that is indexed like a table but just for thead or tbody?
@daneandersen I think entire work with tables in PO is a big hole. Performance is horrible, no tr and th elements. I can't formulate now what we want (me and my colleagues). Now we just use Nokogiri in PO. I'll try to formulate problems, show problem examples and write API that I would like to see in PO (I don't think that I'm ready to make so big pull request to PO).
I appreciate the help. I'm definitely going to check into improving performance, and any help you can give regarding needed API that is missing is very welcome.