I want to extract the text "Hi, Harvey " from the below html source
<div class="col-sm-9>
<div class="shop-menu">
<ul clas="navbar-nav">
::before
"Hi, harvey "
<a href="logout.htm">..</a>
::after
</ul>
</div>
</div>
I have tried:
driver.findElement(By.linkText("Hi, harvey "))
but couldn't extract it, any suggestions?