c# - Unable to recognise an Xpath element in selenium -


having little issue when trying find element using selenium c sharp (hash tag not working).

i have element:

<div class="confirmation-price-summary__price-label underline">     travel essentials  </div> 

i have element same has different text associated it:

    <div class="confirmation-price-summary__price-label underline">     transfer </div> 

i want find 1 contains 'travel essentials' written code below try , find it:

public static travelessentialsbasketlink => by.xpath("//div[text()[contains(.,'travel essentials')] , [@class='confirmation-price-summary__price-label underline']"); 

however, states not valid xpath, how can retrieve element correctly?

thanks

by.xpath("//div[contains(text(),'travel essentials') , @class='confirmation-price-summary__price-label underline']"); 

this should trick.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -