title: To find the Selenium Xpath for checkbox in <div><input>
body: <p>How to click on the checkbox for below code?
  I have tried the below xpaths, but these are not able to detect the checkbox and not even showing any error in console.</p>
  
  <pre><code>driver.findElement(By.xpath("//*[@id='oppDiv']/p[8]/div/input[@id='prepopulateCheckBox']")).click();
  </code></pre>
  
  <p>and </p>
  
  <p>using Absolute XPath:</p>
  
  <pre><code>driver.findElement(By.xpath("html/body/div[1]/div[3]/div/div/div[1]/div/div[1]/form/div[2]/div/p[8]/div/input[@name='prepopulateCheckBox']")).click();
  </code></pre>
  
  <p>Please check the code:</p>
  
  <pre><code>&lt;p&gt;
      &lt;label for="prepopulateCheckBox" class=""&gt;Include the address from the End User Information section.
      &lt;/label&gt;
      &lt;div role="presentation" class="dijit dijitReset dijitInline dijitCheckBox" widgetid="prepopulateCheckBox"&gt;
          &lt;input type="checkbox" 
                 dojoattachevent="onclick:_onClick" 
                 dojoattachpoint="focusNode" 
                 class="dijitReset dijitCheckBoxInput" 
                 name="prepopulateCheckBox" 
                 style="-moz-user-select: none;" 
                 value="true" 
                 id="prepopulateCheckBox" 
                 tabindex="0"&gt;
      &lt;/div&gt;
  &lt;/p&gt;
  </code></pre>