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.edureka.co/");

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 8, 2020 in Software Testing by Punit
• 130 points
1,509 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,230 points

Related Questions In Software Testing

+2 votes
1 answer

Even after providing proper xpath for element on mobile applcation,it is not able to click on the button??

You could probably try using WebDriver driver; ...READ MORE

answered May 8, 2020 in Software Testing by Kim
1,533 views
+1 vote
0 answers

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

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

Jun 21, 2020 in Software Testing by Kumar
• 130 points
1,079 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 1,744 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
13,773 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
9,188 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,910 points
7,263 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 3, 2020 in Selenium by Sri
• 3,190 points
7,902 views
+1 vote
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP