c# - how to locate webelement with innertext -


i use selenium c# write test, face problem.

here html. how can locate "100" on web page?

< ul>   < li class=""> 100 < /li>   < li class=""> 200 < /li>   < li class=""> 300 < /li>   < li class=""> 400 < /li>   < li class=""> 500 < /li>  < /ul> 

iwebdriver driver = new firefoxdriver(); iwebelement element = driver.findelement(by.xpath("//li[text()=' 100 ']")); 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -