css - How to select a web element by text with Selenium WebDriver, Java -


i need find following element on web page

<div class="b-datalist__item__addr">noreply@somedomain.com</div> 

i'm coding java selenium webdriver.
need exact css selector element use driver.findelement(by.cssselector(the-selector).click command.
div[class='b-datalist__item__addr'] selector not enough since must search according noreply@somedomain.com text not link can't use findelement(by.linktext()) command.

css not allow text based search. xpath option there.

//div[contains(text(),'noreply@somedomain.com')] 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -