title: Java Selenium Mouse movement in Decentraland
body: <p>I'm trying to automate the process of moving in Decentraland (a metaverse <a href="https://decentraland.org/" rel="nofollow noreferrer">https://decentraland.org/</a>). After I automated the process of signing up and everything, I jump into the land but when using <code>actions.moveToElement(element, x, y);</code>, no error shows but it won't move the screen of Decentraland for some reason.</p>
  <p>Here's the code</p>
  <pre><code>package com.example;
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.Dimension;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.openqa.selenium.interactions.Actions;
  import java.util.concurrent.TimeUnit;
  
  /**
   * Hello world!
   */
  public final class App {
      /**
       * Says hello to the world.
       * @param args The arguments of the program.
       */
      public static void main(String[] args) {
          System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;chromedriver&quot;);
          WebDriver driver = new ChromeDriver();
  
          driver.get(&quot;https://play.decentraland.org/?position=45%2C19&amp;realm=fenrir-amber&quot;);
  
          Dimension targetSize = new Dimension(800, 600);
          driver.manage().window().setSize(targetSize);
  
          sleep(1);
  
          driver.findElement(By.xpath(&quot;//*[@id=\&quot;eth-login-confirmation-wrapper\&quot;]/button[2]&quot;)).click();
  
          sleep(30);
  
          // avatar section
          Actions actions = new Actions(driver);
          WebElement element = driver.findElement(By.xpath(&quot;//*[@id=\&quot;#canvas\&quot;]&quot;));
          sleep(5);
          actions.moveToElement(element, 333, 210).click().perform();
          
          // create profile section
          actions = new Actions(driver);
          element = driver.findElement(By.xpath(&quot;//*[@id=\&quot;#canvas\&quot;]&quot;));
          sleep(5);
          actions.moveToElement(element, 130, -53).click().perform();
          new Actions(driver).sendKeys(&quot;a&quot;).perform();
          actions.moveToElement(element, 138, 103).click().perform();
  
          // tos section
          actions = new Actions(driver);
          element = driver.findElement(By.xpath(&quot;//*[@id=\&quot;#canvas\&quot;]&quot;));
          sleep(5);
          actions.moveToElement(element, 283, -99).clickAndHold().perform();
          sleep(5);
          actions.moveToElement(element, 283, 58).release().perform();
          sleep(5);
          actions.moveToElement(element, 140, 97).click().perform();
  
          // click got it button in land
          // 0, 166
          actions = new Actions(driver);
          element = driver.findElement(By.xpath(&quot;//*[@id=\&quot;#canvas\&quot;]&quot;));
          sleep(5);
          actions.moveToElement(element, 0, 166).click().perform();
  
          // pan shot
          actions = new Actions(driver);
          element = driver.findElement(By.xpath(&quot;//*[@id=\&quot;#canvas\&quot;]&quot;));
          sleep(5);
          actions.moveToElement(element).click().perform();
          sleep(5);
          actions.moveToElement(element).doubleClick().perform();
          sleep(5);
          for (int i=1; i&lt;5; i++) {
              actions.moveToElement(element, 0, 10 * i).click().perform();
          }
      }
  
      public static void sleep(int seconds)  {
          try {
              internalSleep(seconds);
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
      public static void internalSleep(int seconds) throws InterruptedException {
          TimeUnit.SECONDS.sleep(seconds);
          Thread.sleep((long)seconds * 1000);
      }
  
      public static void print(String message) {
          System.out.println(message);
      }
  }
  
  </code></pre>
  <p>Any help would be greatly appreciated. Thank you.</p>