I'm new to c# and I'm having problems locating elements. I don't quite understand how to find relative xpaths. I'm trying to locate an element. My code is listed below:
IWebElement webElement = driver.FindElement(By.XPath("Nothing I put here works"));
Thread.Sleep(1000);
IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;
Here is what I'm trying to find:
<li _ngcontent-c2="" class="header-item person-search ng-tns-c2-1 ng-star-inserted" ngbdropdown="" ngbtooltip="Person Search" placement="left">
<a _ngcontent-c2="" class="dropdown-toggle dropdown-toggle" aria-haspopup="true" href="javascript:void(0)" ngbdropdowntoggle="" aria-expanded="false">
<span _ngcontent-c2="" class="fa fa-search-plus block"></span>
</a>
</li>