I am trying to use the executeScript to perform an action 'Click' on
anchor tag. The element is identified/located but never clicked. I
tried the following options,
1) ((JavascriptExecutor) driver).executeScript("return
arguments[0].fireEvent('onclick');", webElement); // This works very
fine for buttons on the same page but not anchor tags.
2) Selenium selenium = new WebDriverBackedSelenium(driver,
SeleniumConstants.BASE_URL);
selenium.fireEvent. selenium.keyPress etc // here i get a JS
error
3) new
Actions(driver).moveToElement(element).clickAndHold().release().perform();
Searched a lot on net but nothing helped. Please respond if u have any
thoughts on y is this happening.