I was looking for an answer to how to find an element that has a class and contains text.
I've got two answers.
//div[@class='credit_summary_item' and contains(text(),'Professor']
: as in HTML XPath Searching by class and text//div[contains(@class, 'credit_summary_item') and contains(., 'Professor')]
: as in XPath to match @class value and element value?
For me, only 2nd answer worked. Can anyone pls explain the difference for 'contains text' part.? As both answers don't mention it.