2

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

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]"));
p.click();

Please help to resolve it.

5
  • 1
    please refer this stackoverflow.com/questions/11908249/…. Also there are many more question on same issue Commented Aug 11, 2016 at 7:17
  • Also try this as well seleniumeasy.com/selenium-tutorials/… Commented Aug 11, 2016 at 7:18
  • Could you share your HTML as well.. Commented Aug 11, 2016 at 7:39
  • @huges what version is your firefox? Commented Aug 11, 2016 at 7:42
  • had this issue before. try setting the browserwindow to full hd resolution and see if it can click the button. Commented Aug 11, 2016 at 9:28

1 Answer 1

1

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);
Sign up to request clarification or add additional context in comments.

3 Comments

@huges import class first using import org.openqa.selenium.JavascriptExecutor....:)
@huges it's there, J in upper case, see updated answer..:)
Thanks a lot bro:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.