alexpat
15 years agoOccasional Contributor
How would I select these radiobuttons?
I have a couple of radiobuttons I want to select between but I can't seem to be able to find the right way to find them on the page to select them.
This is my amateurish attempt at trying to select the radio button with the lable PlainText
call emailType.RadioButton.SetFocus("PlainText").Click
Anyone care to point/shove me in the correct direction?
<div class="formtitle">Email Type:</div>
<div class="formfield">
<table id="ctl00_ContentPlaceHolder1_emailTypeRadioButton" border="0">
<tbody>
<tr>
<td>
<input id="ctl00_ContentPlaceHolder1_emailTypeRadioButton_0" name="ctl00$ContentPlaceHolder1$emailTypeRadioButton" value="False" checked="checked" type="radio">
<label for="ctl00_ContentPlaceHolder1_emailTypeRadioButton_0">HTML</label>
</td>
</tr>
<tr>
<td>
<input id="ctl00_ContentPlaceHolder1_emailTypeRadioButton_1" name="ctl00$ContentPlaceHolder1$emailTypeRadioButton" value="True" type="radio">
<label for="ctl00_ContentPlaceHolder1_emailTypeRadioButton_1">PlainText</label>
</td>
</tr>
</tbody>
</table>
</div>
</div>
This is my amateurish attempt at trying to select the radio button with the lable PlainText
set emailType = PageObj.NativeWebObject.Find("name", "ctl00$ContentPlaceHolder1$emailTypeRadioButton", "input")
call emailType.RadioButton.SetFocus("PlainText").Click
Anyone care to point/shove me in the correct direction?