0

<table width="100%" border="0" cellpadding="0" cellspacing="0" id="radioTypeTable" class="radioTable">
      <tbody><tr id="transactionType">    
       
         
          <td align="left" style="width:12px;"><input type="radio" name="preliminaryApplication_TransactionType" tabindex="200" value="1" checked="checked" onclick="clearFSProgramsOnChangeOfTransType();resetDlrPreferredFs();changeTransactionType(this);" id="preliminaryApplication_TransactionType_1" class=""></td>
         <td align="left" class="transtypeLabel"><strong><label id="preliminaryApplication_TransactionType_1_label" for="preliminaryApplication_TransactionType_1">Option1</label></strong></td><td style="width:5%;">&nbsp;</td>

          <td align="left" style="width:12px;"><input type="radio" name="preliminaryApplication_TransactionType" tabindex="200" value="2" onclick="clearFSProgramsOnChangeOfTransType();resetDlrPreferredFs();changeTransactionType(this);" id="preliminaryApplication_TransactionType_2"></td>
         <td align="left" class="transtypeLabel"><strong><label id="preliminaryApplication_TransactionType_2_label" for="preliminaryApplication_TransactionType_2">Option2</label></strong></td><td style="width:5%;">&nbsp;</td>
  
      </tr>   
      <tr>
       <td align="left" colspan="10">

       </td>    
      </tr>          
     </tbody></table>

I have a page that contains multiple radio Buttons with a particular one Selected by default to begin with. While trying to click on any other Radio, it simply does not work and moves further without failing. Things I have tried so far:

Actions class "double click"

Actions actions = new Actions(driver);
actions.doubleClick(element).perform();

Actions class "moveToElement" and then click

Actions actions = new Actions(driver);
actions.moveToElement(element);
actions.click();
actions.build().perform();

Javascript Executor click

((JavascriptExecutor) driver).executeScript("arguments[0].click();", element); 

Even tried in clicking in a while loop

Nothing worked so far. Everything else on the page before and after this button works without any issues. I have looked for any possible iFrames as well. I could see the button being turned blue while clicking on it. However, the click does not stick. I have also given sufficient wait both implicit and explicit to try as well. I have also checked if the button is visible or not. Any suggestions.

Anp
  • 47
  • 8
  • Does this answer your question? [Unable to click on a radio button in Selenium Webdriver](https://stackoverflow.com/questions/32307141/unable-to-click-on-a-radio-button-in-selenium-webdriver) – alexyorke Dec 08 '19 at 17:52
  • Have gone thru that and given sufficient wait both implicit and explicit to try as well. Nothing worked so far. – Anp Dec 08 '19 at 17:58
  • Please share the page html and thrown exception (if any). – pburgr Dec 09 '19 at 07:46
  • I have added the snippet of html page above. As I have mentioned, I don't get any exception. – Anp Dec 09 '19 at 16:27

0 Answers0