Checkbox popup/ hover obscures elements


Hi all

First post so I hope you understand me and that I have selected the right category?

I am using Selenium/ Java in TestNG for automated tested of web based application.

I have an issue whereby I need to select multiple checkbox’s on the same form. This generally works well but on occasion dependant on the position of the ‘ticks’ in relation to each other, a tooltip/ hover message pops up and obscures 4 or 5 other box’s that may need to be ‘ticked’ next. There is no cancel or any other dialogue on the message.

I have tried various action procedures to move away and back to the element but to no avail as the box’s that are affected are just missed out completely and it continues without any error even though the speed of the checkbox ticking is very fast (I need that anyway) as there can be 1 to 20 rows to iterate through in the table, so I am suprised that the hover has time to popup?

Any help on avoiding the popup will be greatly appreciated

Thank you

alanb Train Asked on October 13, 2015 in Selenium WebDriver.
Add Comment
7 Answer(s)
Best answer

Eureka Virender!!

Approach 2 worked, thank you very much!

Working great now and even faster.

Best regards


alanb Train Answered on October 16, 2015.
Add Comment


You can try to fire a direct javascript click action on the radio button instead of through the WebElement API.

Let me get back home and try to give a sample code.


Virender Singh Professor Answered on October 13, 2015.
Add Comment

Thanks for the quick reply

I am also using org.apache.poi.hssf.usermodel.HSSFWorkbook to read the required data from Excel, in case that has any bearing on you’re solution 😉


alanb Train Answered on October 13, 2015.
Add Comment

Make a list/group of checkboxes, say    List<WebElement> check boxes.
Then click on each check box you wish tick by its index no.

BhavinR Train Answered on October 14, 2015.
Add Comment

I’m not sure what you mean?

Currently I am iterating through Excel cells, rows/cols to find which checkbox needs to be ticked according to the Excel reference.

The code is currently working like this (sample) but with the popup getting in the way of some checkbox’s

String sRow = “5”;
String sCol = “10”;
Actions action = new Actions(driver);
WebElement element = driver.findElement(By.xpath(“//div[@class=’table-placeholder’]/table[4]/tbody/tr[“+sRow+”]/td[“+sCol+”]/input”));


alanb Train Answered on October 14, 2015.
Add Comment

Ok not getting far with this

I would like to try using findElement(By.cssSelector to see if that helps, can anyone help me convert


to cssSelector?

Thank You

alanb Train Answered on October 15, 2015.
Add Comment

Alan, Sorry for the late reply. The actual problem is that you are trying to mouse the mouse over the element. You can directly click on the element and avoid this. Here are two ways to do the same thing

 String exePath = "C:\\Users\\abc\\Desktop\\Server\\chromedriver.exe";
 System.setProperty("", exePath);
 WebDriver driver = new ChromeDriver();
WebElement radioButton = driver.findElement(By.xpath("//*[@id='exp-2']"));
 //Approach one : Directly click without moving mouse;
//Approach 2: Click via Java script
((JavascriptExecutor) driver).executeScript("arguments[0].click();", radioButton);

Also, if you want to find the CSS path you can go to chrome developer mode. Or right click on the Chrome browser and click Inspect. Then in the HTML code of the element, simple right click and choose CSS path.


Virender Singh Professor Answered on October 16, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.