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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -