Reputation: 37
<div class="summary-number-lg ng-binding" name="ib-summary-revenue"> $ 248 </div>
I need to validate if the summary revenue is $248
or not.
Is there any way to validate the name and the value? And how to select them using find elements?
Upvotes: 0
Views: 30
Reputation: 473983
Locate the element, for example, by name and assert its text. Example in Python:
summary_revenue = driver.find_element_by_name("ib-summary-revenue")
assert summary_revenue.text.strip() == "$ 248"
Upvotes: 1