How to simulate mouse click on blank area in website by Selenium IDE? How to simulate mouse click on blank area in website by Selenium IDE? selenium selenium

How to simulate mouse click on blank area in website by Selenium IDE?


You can use the command:

driver.findElement(By.xpath("//html")).click();

But sometimes it doesnt take blank spaces,

In such cases, use:

driver.get("//html");


'html' is a special element, what you want is 'body' (the first DOM element that is 'visible')

so please use the following (tested with Chrome confirme working with no problem):

python exampledriver.find_element_by_xpath("//body").click()


The best solution is to just use the keyboard TAB key by executing the following statement.

element.sendKeys(Keys.TAB);

It will focus the next element - thus out of the field - and you will get your desired result.