Double click using selenium

package SeleniumWebDriver;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.AfterTest;

public class DoubleClick {
    WebDriver driver;
    
    @Test
    public void Doubleclick() throws Exception {
    driver.get("http://www.seleniumlearn.com/double-click");
    Thread.sleep(9000);
    Actions act = new Actions(driver);
    act.moveToElement(driver.findElement(By.xpath("//*[@id='node-104']/div/div[1]/div/div/button"))).doubleClick().perform();
    } 
  @BeforeTest
  public void beforeTest() {
      driver=new FirefoxDriver();
      driver.manage().window().maximize();
  }

  @AfterTest
  public void afterTest() {
  }

}

Tags: