jarib / celerity

This project is no longer maintained.
http://celerity.rubyforge.org/
GNU General Public License v2.0
206 stars 38 forks source link

Is it possible to manipulate an element by multiple criteria #52

Closed kboggs117 closed 13 years ago

kboggs117 commented 13 years ago

I am in a situation where I need to click a series of radio buttons and fill in text boxes that appear once the buttons are clicked. the problem is that they are all named the same names (both sets of buttons and text boxes). I need to click the first button, then fill in the first text box and then click the unique submit button, and repeat only with the next set of button/ boxes that are names the same.

Since they have the same name it clicks the first radio button and text box when I want it to click the 2nd, (and 3ed, and 4th) is there any way I can specify which ones I mean to click?

I need to click: <input type="radio" name="file_upload" and: <input type="text" name="file_download_url"

for both the first and second sections, I just don't know it that is possible with celerity.

the view source code of what I need to click:
/////////////////////////////////////////////////////////////////////////////////

        <td nowrap width="100%">
            <input type="radio" name="file_upload" checked onChange="selectUploadField(true, this.form.file, this.form.file_download_url)"/> Local file
            <input type="radio" name="file_upload" onChange="selectUploadField(false, this.form.file, this.form.file_download_url)"/> URL<br>

            <input type="file" name="file" size="40">
            <input type="text" name="file_download_url" size="40" style="display:none;"><br>

                    <input type="image" name="UploadFile" value="Upload File" src="images/buttons/upload.png">

            <br>
        </td>
    </tr>
</form>


<tr>
    <td>&nbsp;</td>
</tr>
<tr>

    <td valign="top" width="100%" colspan="4">

                <strong>Upload OTA File:</strong>

        <br>

            (OTA Installation files should be CAB files for PocketPC (or EXE only if the file is compiled with Spb AirSetup), PRC files for Palm OS, SIS/SISX/JAR files for Symbian, and APK for Android.)

    </td>
</tr>
<tr>

        <form name="otaproductform" action="productfileupload.dp" method="post" enctype="multipart/form-data" onSubmit="return validOTAData();">

            <input type="hidden" name="productId" value="303554">
            <input type="hidden" name="whichJspFile" value="productfileupload.dp">

            <td class="label-column">Upload OTA File:</td>
            <td>
                <input type="radio" name="file_upload" checked onChange="selectUploadField(true, this.form.file, this.form.file_download_url)"/> Local file
                <input type="radio" name="file_upload" onChange="selectUploadField(false, this.form.file, this.form.file_download_url)"/> URL<br>
                <input type="file" name="file" size="40">

                <input type="text" name="file_download_url" size="40" style="display:none;"><br>

                        <input type="image" name="UploadOTAFile" value="Upload File" src="images/buttons/upload.png">

            </td>
        </form>

///////////////Thank you for your time and help!