Here is the code snippet I have:
IWebElement Enter = webDriver.FindElement(By.LinkText("Enter"));
I am trying to extract the text "Enter" from the following code:
<li>
<a onclick="javascript:var p;if (document.getElementById('chckPot').checked==true){p=1;}else{p=0;};waitScreen();window.open('frmnewname.aspx?mod=0&pot='+p,'mojframe');" href="#">
<i class="fa fa-lg fa-folder-open">;</i>
Enter
</a>
</li>
No matter what I try, I keep getting this error message:
OpenQA.Selenium.NoSuchElementException: Unable to find element with LinkText == Enter
The test code is written in C#, and while the previous version of the application had an ID for this element, the new one does not have it as shown in the code.