title: How to scroll down in a dialog box using selenium
body: <p>In <a href="https://signup.insly.com/signup" rel="nofollow noreferrer">this</a> page, 
  The form includes 2 validations regarding the  <strong><em>Privacy Policy</em></strong> part:</p>
  
  <ol>
  <li>Click on the link of <em>Privacy Policy</em>, it opens a dialog box and user should scroll it down.</li>
  <li>Check the checkbox related to it</li>
  </ol>
  
  <p>I have no problem in checking the checkbox, <strong><em>but i am not able scroll down</em></strong> in the below window:</p>
  
  <p><a href="https://i.stack.imgur.com/3tikI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3tikI.png" alt="enter image description here"></a></p>
  
  <p>I have this method to wait till the elements get loaded:</p>
  
  <pre><code>public void waitForElement(String xPath) {
          WebDriverWait wait = new WebDriverWait(driver, 1);
          wait.until(ExpectedConditions.elementToBeClickable(By.xpath(xPath)));
      }
  </code></pre>
  
  <p>So, how can i scroll down, and close the window?
  I also don't know how should i use my <code>waitForElement</code> in this case?</p>
  
  <p>Here is <a href="https://github.com/salman-/AutomatedSignUp" rel="nofollow noreferrer">the repo</a>, it is a very short code. You just need to run the <code>feature</code> file</p>