Python Selenium SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//div[contains(@class, 'product-card__subtitle')
问题 Trying to get the XPath of div class and the text inside of the div. the two divs are: <div class="product-card__subtitle">Women's Shoe</div> <div class="product-card__subtitle">Men's Shoe</div> My Xpaths that are giving the selenium error are: driver.find_element_by_xpath("//div[contains(@class, 'product-card__subtitle') and text(" ")='Women's Shoe']") driver.find_element_by_xpath("//div[contains(@class, 'product-card__subtitle') and text()='Men's " "Shoe']") I am trying to get the path for