title: How to check the hidden radio/checkbox is selected in selenium using JavascriptExecutor
body: <p>My application has some radio/checkboxes which are designed over the <code>visibility:hidden</code> radio/checkboxes using dive as a wrapper</p>
  
  <p>sample code:</p>
  
  <pre><code>&lt;div class="radio-custom"&gt;
  &lt;label&gt;
  &lt;input id="test" name="test" value="a" onchange="test(2);" type="radio"&gt;
  Test
  &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>which is displaying like </p>
  
  <p><a href="https://i.stack.imgur.com/ntJj8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ntJj8.png" alt="Custom radios"></a>
  The actual inputs are set to <code>visibility:hidden</code> so it cannot be accessed via selenium command so currently using the JSE to handle this</p>
  
  <pre><code>String script = "return arguments[0].click()";
  WebElement we = driver.findElement(By.xpath("element xpath"));
  JavascriptExecutor jse = (JavascriptExecutor) driver;
  jse.executeScript(script, we);
  </code></pre>
  
  <p>How to check the radio/checkbox is enabled?</p>
  
  <p>Note: The checked property is not properly changing based on the selection</p>