Saturday 2 January 2016

Selenium - Solution for click is not working properly in chrome


Please follow any one of method as mentioned below if click is not working properly in chrome


-> if click() method is not working, use sendkeys(Keys.Return)

driver1.findElement(By.xpath("//button")).sendKeys(Keys.RETURN);


->or use Action class as below

WebElement element = driver.findElement(By("element_path"));

Actions actions = new Actions(driver);

actions.moveToElement(element).click().perform():


-> or use java script as below

JavascriptExecutor jse = (JavascriptExecutor)driver;

jse.executeScript("scroll(250, 0)"); // if the element is on top.

jse.executeScript("scroll(0, 250)"); // if the element is on bottom.
or

JavascriptExecutor jse = (JavascriptExecutor)driver;

jse.executeScript("arguments[0].scrollIntoView()", Webelement);


Refer = http://stackoverflow.com/questions/11908249/debugging-element-is-not-clickable-at-point-error

No comments:

Post a Comment