java - Get HTML element by text -


consider have html:

<span class="bla">create new</span> 

how can element ?

i try:

span:contains("create") 

you can use "by xpath" locator:

driver.findelement(by.xpath("//span[. = 'create new']")); 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -