I am currently utilizing Selenium-webdriver with C# to run tests on a website. However, I am encountering an issue where the Click()
function is not working when I try to click on a link. The expected behavior is for a new window to open upon clicking the link. Upon inspecting the HTML structure, I noticed that there is a JavaScript action associated with the link.
Here is the relevant HTML code:
<span class="new_doc">
<a style="cursor: pointer;" onclick="javascript:popwinnewproject('pc.aspx?page=docnew2tree&j=P2&grp=actv&t=');">
<img title="new doc" src="http://local:8080/res/icon/new-doc.png"/>
Could anyone advise on the appropriate method to use in order to successfully click on the link and open the new window?