Select Radio Button is not able to select a radio button among a group

2,431 views
Skip to first unread message

Krishan Kumar

unread,
Jul 21, 2010, 5:26:21 AM7/21/10
to robotframe...@googlegroups.com
Hi All

I am having a table in which one column contains radio buttons. I want to select one of them with the help of Select Radio Button keyword. But the keyword is not able to select it. I tried to check the id of radio buttons using Selenium IDE plugin. but it gave me the "LOCATOR_DETECTION_FAILED" response. Any help?



<rich:dataTable id="AlarmListTable" value="#{aeAlarmNEList.alarmInfoDTOList}"
var="alarmsInfoDto"
headerClass="table"
styleClass="tagTable"
rowClasses="odd,even"
rows="10">
<h:column id="alarmId"  >
<input id="alarmIdValue" type="radio" name="alarmId"
value="#{alarmsInfoDto.alarmId}" />
</h:column>

<h:column id="alarmTime" >
<f:facet name="header">
<h:outputText id="alarmTimeLabel" styleClass="staticHeadingStyle" value="#{bundle.modal_panel_alarm_time_header}" />
</f:facet>
<h:outputText id="alarmTimeValue" value="#{alarmsInfoDto.alarmTime}" styleClass="nonEditableTableText"/>
</h:column>
<h:column id="alarmText">
<f:facet name="header">
<h:outputText id="alarmTextLabel" styleClass="staticHeadingStyle" value="#{bundle.modal_panel_alarm_text_header}" />
</f:facet>
<h:outputText id="alarmTextValue" value="#{alarmsInfoDto.alarmText}" styleClass="nonEditableTableText"/>
</h:column>
<h:column id="alarmNumber" >
<f:facet name="header">
<h:outputText id="alarmNumberLabel" styleClass="staticHeadingStyle" value="#{bundle.modal_panel_alarm_num_header}" />
</f:facet>
<h:outputText id="alarmNumberValue" value="#{alarmsInfoDto.specificProblem}" styleClass="nonEditableTableText"/>
</h:column>
<h:column id="alarmSeverity" >
<f:facet name="header">
<h:outputText id="alarmSeverityLabel" styleClass="staticHeadingStyle" value="#{bundle.modal_panel_alarm_svrty_header}" />
</f:facet>
<h:outputText id="alarmSeverityValue" value="#{alarmsInfoDto.perceivedSeverity}" styleClass="nonEditableTableText"/>
</h:column>
<f:facet id="AlarmListTableFooter" name="footer">
<rich:datascroller id="dsForAlarmListTable" for="AlarmListTable"></rich:datascroller>
</f:facet>
</rich:dataTable>


Following is the html response generated by the page

                    			<input type="radio" name="alarmId" value="6053AE" />
                	  			6053AE</td><td id="modalPanelForm:AlarmListTable:0:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:0:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:14</span></td><td id="modalPanelForm:AlarmListTable:0:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:0:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:0:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:0:alarmNumberValue" class="nonEditableTableText">119</span></td><td id="modalPanelForm:AlarmListTable:0:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:0:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow even"><td id="modalPanelForm:AlarmListTable:1:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="14512AE" />
                	  			14512AE</td><td id="modalPanelForm:AlarmListTable:1:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:1:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:12</span></td><td id="modalPanelForm:AlarmListTable:1:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:1:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:1:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:1:alarmNumberValue" class="nonEditableTableText">118</span></td><td id="modalPanelForm:AlarmListTable:1:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:1:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow odd"><td id="modalPanelForm:AlarmListTable:2:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="3464AE" />
                	  			3464AE</td><td id="modalPanelForm:AlarmListTable:2:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:2:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:10</span></td><td id="modalPanelForm:AlarmListTable:2:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:2:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:2:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:2:alarmNumberValue" class="nonEditableTableText">117</span></td><td id="modalPanelForm:AlarmListTable:2:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:2:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow even"><td id="modalPanelForm:AlarmListTable:3:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="4309AE" />
                	  			4309AE</td><td id="modalPanelForm:AlarmListTable:3:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:3:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:09</span></td><td id="modalPanelForm:AlarmListTable:3:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:3:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:3:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:3:alarmNumberValue" class="nonEditableTableText">116</span></td><td id="modalPanelForm:AlarmListTable:3:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:3:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow odd"><td id="modalPanelForm:AlarmListTable:4:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="32753AE" />
                	  			32753AE</td><td id="modalPanelForm:AlarmListTable:4:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:4:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:07</span></td><td id="modalPanelForm:AlarmListTable:4:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:4:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:4:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:4:alarmNumberValue" class="nonEditableTableText">115</span></td><td id="modalPanelForm:AlarmListTable:4:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:4:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow even"><td id="modalPanelForm:AlarmListTable:5:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="30742AE" />
                	  			30742AE</td><td id="modalPanelForm:AlarmListTable:5:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:5:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:05</span></td><td id="modalPanelForm:AlarmListTable:5:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:5:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:5:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:5:alarmNumberValue" class="nonEditableTableText">114</span></td><td id="modalPanelForm:AlarmListTable:5:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:5:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow odd"><td id="modalPanelForm:AlarmListTable:6:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="7312AE" />
                	  			7312AE</td><td id="modalPanelForm:AlarmListTable:6:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:6:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:04</span></td><td id="modalPanelForm:AlarmListTable:6:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:6:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:6:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:6:alarmNumberValue" class="nonEditableTableText">113</span></td><td id="modalPanelForm:AlarmListTable:6:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:6:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow even"><td id="modalPanelForm:AlarmListTable:7:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="12320AE" />
                	  			12320AE</td><td id="modalPanelForm:AlarmListTable:7:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:7:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:02</span></td><td id="modalPanelForm:AlarmListTable:7:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:7:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:7:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:7:alarmNumberValue" class="nonEditableTableText">112</span></td><td id="modalPanelForm:AlarmListTable:7:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:7:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow odd"><td id="modalPanelForm:AlarmListTable:8:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="29600AE" />
                	  			29600AE</td><td id="modalPanelForm:AlarmListTable:8:alarmTime" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:8:alarmTimeValue" class="nonEditableTableText">2010-07-20 12:50:00</span></td><td id="modalPanelForm:AlarmListTable:8:alarmText" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:8:alarmTextValue" class="nonEditableTableText">AlarmForRobotTest_MO Not Pingable</span></td><td id="modalPanelForm:AlarmListTable:8:alarmNumber" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:8:alarmNumberValue" class="nonEditableTableText">111</span></td><td id="modalPanelForm:AlarmListTable:8:alarmSeverity" class="dr-table-cell rich-table-cell "><span id="modalPanelForm:AlarmListTable:8:alarmSeverityValue" class="nonEditableTableText">0</span></td></tr><tr class="dr-table-firstrow rich-table-firstrow even"><td id="modalPanelForm:AlarmListTable:9:j_id98" class="dr-table-cell rich-table-cell ">
                    			<input type="radio" name="alarmId" value="15107AE" />
                	  			15107AE</td><td id="modalPanelForm:AlarmListTable:9:alarmTime" class="







--
Sincerely
Krishan Kumar
Nokia Siemens Networks
Bangalore


Prashant Katiyar

unread,
Jul 21, 2010, 6:15:09 AM7/21/10
to aap...@gmail.com, robotframe...@googlegroups.com
Select Radio Button        alarmId        alarmIdValue
OR
Select Radio Button        alarmId       6053AE

both should work depending on the page you have.
If not you may trying using xpath


thanks
prashant



--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.

AndreasEK

unread,
Jul 21, 2010, 8:49:47 AM7/21/10
to robotframework-users
In the Selenium IDE you cannot use the same expressions as in the
SeleniumLibrary, since the Select Radio Button trying a self-
constructed xpath before using the selenium method directly.

What's Robot's failure message?

Andreas

AndreasEK

unread,
Jul 23, 2010, 9:46:35 AM7/23/10
to robotframework-users

N.T.

unread,
Jul 29, 2015, 5:11:40 AM7/29/15
to robotframework-users, Andreas...@gmx.de
Hi Andreas,

Do you still have that screencast? I tried to find it in your blog but the video doesn't seem to be there anymore.

I'm having similar problems with selecting radio buttons and the thing is that there is no name on the group.

Andreas Ebbert-Karroum

unread,
Jul 29, 2015, 9:38:56 AM7/29/15
to N.T., robotframework-users, Andreas...@gmx.de
Hi,

I linked the video again, but in the meantime there are better means to debug xpath and css locators. In firefox, you can for example use firebug and the firepath extension:

Andreas
Reply all
Reply to author
Forward
0 new messages