- On form, there is one binocular.
- On click on binocular, pop up opens.
- There are radio buttons on pop up. I need to click on radio buttons, it's failing.
I have tried below code but it shows error
findElement(By.id("clCategory_binacular")).click();
WebDriverWait wait=new WebDriverWait(d,10);
WebElement ele=wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id='idCommonGridTableclCategory_binacularGridContainer']/tbody/tr[2]/td[3]/div/label")));
Actions builder =new Actions(d);
builder.moveToElement(ele).click().build();
Error:
Exception in thread "main" org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element to be clickable: By.xpath: //*[@id='idCommonGridTableclCategory_binacularGridContainer']/tbody/tr[2]/td[3]/div/label (tried for 10 second(s) with 500 MILLISECONDS interval)
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
Below is html code:
<tbody>
<tr class="jqgfirstrow" role="row" style="height:auto">
<td role="gridcell" style="height:0px;width:150px;display:none;">
</td>
<td role="gridcell" style=
"height:0px;width:150px;display:none;">
</td>
<td role="gridcell" style="height: 0px; width: 192px;">
</td>
<td role="gridcell" style="height: 0px; width: 957px;">
</td>
</tr>
<tr role="row"
id="4864.33645.61824.39547" tabindex="0" class="ui-widget-content jqgrow ui-row-ltr ui-state-highlight" aria-selected="true">
<td role="gridcell" style="display:none;"
aria-describedby="idCommonGridTableclCategory_binacularGridContainer_id">4864.33645.61824.39547
</td>
<td role="gridcell" style="display:none;" aria-describedby=
"idCommonGridTableclCategory_binacularGridContainer_cellData">{"id":"4864.33645.61824.39547","key":"clCategory","forID":"clCategory","value":"Legal - General","label":"Legal -
General","name":"C2-1","categoryType":"General","type":"LEXClauseCategory"}
</td>
<td role="gridcell" style="" class="selectToInsertCol" aria-describedby=
"idCommonGridTableclCategory_binacularGridContainer_">
<div class="radioInlineMargin toggle-primary toggle-inline toggle toggle-root">
<input type="radio" class="selectToInsertTemplate"
name="selectToInsertTemplate" id="selectCp4864336456182439547" value="">
<label class="control-label" for="selectCp4864336456182439547"></label>
</div>
</td>
<td role="gridcell" style=
"text-align:left;" aria-describedby="idCommonGridTableclCategory_binacularGridContainer_title">Legal - General
</td>
</tr>
<tr role="row" id="4864.33645.61824.40762" tabindex="-1" class=
"ui-widget-content jqgrow ui-row-ltr">
<td role="gridcell" style="display:none;" aria-describedby="idCommonGridTableclCategory_binacularGridContainer_id">4864.33645.61824.40762
</td>
<td
role="gridcell" style="display:none;" aria-describedby="idCommonGridTableclCategory_binacularGridContainer_cellData">
{"id":"4864.33645.61824.40762","key":"clCategory","forID":"clCategory","value":"Legal - Standardized Deviations","label":"Legal - Standardized
Deviations","name":"C2-2","categoryType":"Deviation","type":"LEXClauseCategory"}
</td>
<td role="gridcell" style="" class="selectToInsertCol" aria-describedby=
"idCommonGridTableclCategory_binacularGridContainer_">
<div class="radioInlineMargin toggle-primary toggle-inline toggle toggle-root">
<input type="radio" class="selectToInsertTemplate"
name="selectToInsertTemplate" id="selectCp4864336456182440762" value="">
<label class="control-label" for="selectCp4864336456182440762"></label>
</div>
</td>
<td role="gridcell" style=
"text-align:left;" aria-describedby="idCommonGridTableclCategory_binacularGridContainer_title">Legal - Standardized Deviations
</td>
</tr>
<tr role="row" id="4864.33645.61824.36371"
tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
<td role="gridcell" style="display:none;" aria-describedby="idCommonGridTableclCategory_binacularGridContainer_id">
4864.33645.61824.36371
</td>
<td role="gridcell" style="display:none;" aria-describedby="idCommonGridTableclCategory_binacularGridContainer_cellData">
{"id":"4864.33645.61824.36371","key":"clCategory","forID":"clCategory","value":"Pricing and Negotiation - Standardized Deviations","label":"Pricing and Negotiation - Standardized
Deviations","name":"C1-2","categoryType":"Deviation","type":"LEXClauseCategory"}
</td>
<td role="gridcell" style="" class="selectToInsertCol" aria-describedby=
"idCommonGridTableclCategory_binacularGridContainer_">
<div class="radioInlineMargin toggle-primary toggle-inline toggle toggle-root">
<input type="radio" class="selectToInsertTemplate"
name="selectToInsertTemplate" id="selectCp4864336456182436371" value="">
<label class="control-label" for="selectCp4864336456182436371"></label>
</div>
</td>
<td role="gridcell" style=
"text-align:left;" aria-describedby="idCommonGridTableclCategory_binacularGridContainer_title">Pricing and Negotiation - Standardized Deviations
</td>
</tr>
</tbody>