view raw
huges huges - 9 months ago 47
Java Question

Error in selenium when running firefox

I am getting below error when I try to click on one element in


Element is not clickable at point (320.2166748046875, 55). Other element would receive the click:
<a class="navbar-brand" href="#"></a>

Selenium code

WebElement p = driver_new.findElement(By.xpath("html/body/div[2]/div/form/fieldset[2]/div[3]/div/div[2]/a[1]/div/div/div[2]"));;

Please help to resolve it.


If you have tried all but didn't get success, you should try using javascriptExecutor to perform click as below :-

import org.openqa.selenium.JavascriptExecutor;

WebElement bp = driver_new.findElement(By.xpath("html/body/div[2]/div/form/fieldset[2]/div[3]/div/div[2]/a[1]/div/div/div[2]"));
((JavascriptExecutor)driver_new).executeScript("arguments[0].click()", bp);