Module 13 selenium webdriver .. Element not clickable | Selenium Forum
M
Posted on 10/05/2016
when im running rediff2 code its not printing 10th element ..
********8*************
Office Products
Office Products - Buy office stationery online - Rediff Shopping
********9*************
Men's Bracelets
Bracelets for Men - Buy men's bracelets online - Rediff Shopping
********10*************
Sports
Exception in thread "main" org.openqa.selenium.WebDriverException: Element is not clickable at point (41, 8.399993896484375). Other element would receive the click: <div class="topfixheader wednesday"></div>
Command duration or timeout: 69 milliseconds



public class Rediff2 {

public static void main(String[] args) {
ProfilesIni profile=new ProfilesIni();
FirefoxProfile defaultprofile=profile.getProfile("default");
WebDriver driver=new FirefoxDriver(defaultprofile);
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);

driver.get("http://shopping.rediff.com/?sc_cid=ushome_icon");
String s1="//*[@id='popular_cat']/h3[";
String s2="]/a";


WebElement box =driver.findElement(By.xpath("//*[@id='popular_cat']"));
List<WebElement> links=box.findElements(By.tagName("a"));
for(int i=1;i<=links.size();i++)
{
System.out.println("********"+ i +"*************");
String text=driver.findElement(By.xpath(s1+i+s2)).getText();
System.out.println(text);
driver.findElement(By.xpath(s1+i+s2)).click();
System.out.println(driver.getTitle());

driver.navigate().back();

}
}

}

M
Replied on 11/05/2016

check this blog post out

https://www.seleniumeasy.com/selenium-tutorials/element-is-not-clickable-at-point-selenium-webdriver-exception