As part of my Selenium test for a login function, I would like to click a button by identifying its coordinates and instructing Selenium to click at those coordinates. This
WebElement button = driver.findElement(By.xpath("//button[@type='submit']")); int height = button.getSize().getHeight(); int width = button.getSize().getWidth(); Actions act = new Actions(driver); act.moveToElement(button).moveByOffset((width/2)+2,(height/2)+2).click();