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
Post a Comment