Am using selenium webdriver 2.210 + JAVA for testing.I have a sample code for selecting all mails in gmail.But the code throws an \"Element is not currently visible and so m
Here is a summary of things you can do to tackle the problem (examples in Protractor/Javascript):
maximize the browser window (on Chrome+Mac, currently you have to do it differently):
browser.driver.manage().window().maximize();
verify that there are no other elements matching the locator. You can get this error if there is an another element matching the locator that is actually invisible.
wait for the element to be clickable:
var EC = protractor.ExpectedConditions,
elm = element(by.id("myid"));
browser.wait(EC.elementToBeClickable(elm), 5000);
scroll into view of the element:
var elm = element(by.id("myid"));
browser.executeScript("arguments[0].scrollIntoView();", elm);
click via javascript:
var elm = element(by.id("myid"));
browser.executeScript("arguments[0].click();", elm);
move to element and click via "browser actions":
var elm = element(by.id("myid"));
browser.actions()
.mouseMove(elm)
.click()
.perform();