while performing below operation i have use the driver close method but my browser is not closing instead of closing it is giving me below error

+1 vote

I am using the selenium tool to automate the Flipkart web application. I am trying to click on the login button. I am getting the below error.

Exception in thread "main" org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <a class="_3Ep39l" href="/account/login?ret=/">...</a> is not clickable at point (968, 27). Other element would receive the click: <div class="_2ISNhP _3AOFWO" tabindex="-1">...</div>

these is look like a link so i used these code

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver", "C:\\Users\\Sunit\\eclipse-workspace\\Selenium\\Drivers\\chromedriver.exe");

driver = new ChromeDriver();

driver.manage().window().maximize();

driver.get("https://www.flipkart.com/");

driver.findElement(By.linkText("Login")).click(); 

driver.quit();

 So i wanted to be close the browser after click on login symbol. but it is giving me an error which i mentioned above. Could you guy take a look and provide your valuable comment and soultion here.

 

Sep 7, 2020 in Software Testing by Punit
• 130 points
284 views

1 answer to this question.

0 votes

If waiting for element, sleep and other stuff like this are not working, try to click using JS, because probably something is overlaying this element.

Something like this:

WebElement element = driver.findElement(By.xpath(“xpath”));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript(“arguments[0].click();”, element);
answered Sep 8, 2020 by Sirajul
• 59,070 points

Related Questions In Software Testing

+2 votes
1 answer
+1 vote
0 answers

Selenium Driver.Pageload() is not working in safari browser

Am trying to wait tll page loads ...READ MORE

Jun 20, 2020 in Software Testing by Kumar
• 130 points
311 views
+2 votes
0 answers

Hello. Iam testing a php script and i get a notice error how do i fix it?

A PHP Error was encountered Severity: Notice Message: Undefined ...READ MORE

Aug 28, 2020 in Software Testing by Titus
• 160 points

edited Aug 28, 2020 by Niroj 304 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
5,880 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
6,365 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
3,992 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,190 points
4,943 views
+1 vote
1 answer