title: How to handle "MoveTargetOutOfBoundsException" in selenium webdriver
body: <p>When I am using moveToElement, I am getting an error "<em>org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: Offset within element cannot be scrolled into view: (0, 0): Command duration or timeout: 34 milliseconds</em>". Below code is used for that</p>
  
  <pre><code>WebDriverWait waitForEditI = new WebDriverWait(driver, 20);     
  waitForEditI.until(ExpectedConditions.elementToBeClickable(editContactI));
  Actions action = new Actions(driver);
      action.moveToElement(editContactI).moveToElement(editContactIEdit).click().build().perform();
  </code></pre>
  
  <p>and the web elements are </p>
  
  <pre><code>@FindBy(how = How.CSS, using = "div#evy_aboutme_content_id08  div.evy_edit_overflow &gt; div.evy_rltn_icon2 i")    
    WebElement  editContactI;
  
    @FindBy(how = How.CSS, using = "div#evy_aboutme_content_id08  div.evy_aboutme_education_content.ng-scope   a:nth-child(1)")   
   WebElement editContactIEdit;
  </code></pre>
  
  <p>As the below image, first I  need to hover i element (which is marked in yellow circle) and click the edit (black circle). </p>
  
  <p><a href="https://i.stack.imgur.com/m1V5T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m1V5T.png" alt="enter image description here"></a></p>
  
  <p>I have tried  all below options .But nothing is working. The position of it is dynamic. </p>
  
  <pre><code>JavascriptExecutor jse = (JavascriptExecutor)driver;
  jse.executeScript("scroll(250, 0)");
  </code></pre>
  
  <p>and </p>
  
  <pre><code>Actions actions = new Actions(driver);
  actions.keyDown(Keys.CONTROL).sendKeys(Keys.END).perform();
  </code></pre>
  
  <p>Please help me. </p>