MouseMovement not running | Selenium Forum
M
Posted on 02/01/2017
The code below (Module 15) is not running (MouseMovements.java). Please read the comments alongside each line

WebElement box = driver.findElement(By.xpath("//*[@id='CLUBS_1']/div[1]"));
List<WebElement> links =box.findElements(By.tagName("a"));
int totalLinks=links.size();
System.out.println("Total -> "+totalLinks);

Random r = new Random();
int randomNumber = r.nextInt(links.size());
WebElement link = links.get(randomNumber);
System.out.println(link.getText());
link.click();// At this line the exception comes up
org.openqa.selenium.ElementNotVisibleException: element not visible.

Tried on both chrome and firefox. This exception comes on Chrrome.

M
Replied on 03/01/2017

send a screen shot of chrome where the element is on webpage.