Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable | Selenium Forum

Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable | Selenium Forum

Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable

I was launching https://www.americangolf.co.uk/ website and clicking on cart. but despite having thre correct xpath, cart is not getting clicked and i am getting an exception.

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver;

public static void main(String[] args) { // TODO Auto-generated method stub WebDriver driver = new ChromeDriver(); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); driver.manage().window().maximize(); driver.get("https://www.americangolf.co.uk/"); driver.findElement(By.xpath("//*[@id=\"header-top-wrapper\"]/div/div[3]/div[2]/div[4]/div/div[2]/a/i")).click(); String text = driver.findElement(By.xpath("//*[@id=\"cart\"]/h1")).getText(); System.out.println(text); driver.quit();

Please share the complete exception stack trace. We won't be able to suggest a solution without that.

We offer online selenium and UFT/QTP training. The course is very comprehensive and covers every aspect of automation testing with UFT/QTP and selenium. All types of frameworks are covered in depth - data driven framework, hybrid framework, page object model with a live project

© 2020 Whizdom Trainings. All rights Reserved - Powered by Whizdom Trainings

Recommended articles