Watir: How to retrieve all HTML elements that match an attribute? (class, id, title, etc)
问题 I have a page that is dynamically created and displays a list of products with their prices. Since it's dynamic, the same code is reused to create each product's information, so they share the tags and same classes. For instance: <div class="product"> <div class="name">Product A</div> <div class="details"> <span class="description">Description A goes here...</span> <span class="price">$ 180.00</span> </div> </div> <div class="product"> <div class="name">Product B</div> <div class="details">