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']")); 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
Post a Comment