|
selecting text right after a radio button using xpath: msg#00047web.selenium.user
Hello, This is a tough one to crack. My application generates a set of radio buttons dynamicaly like so *********** <input type="radio" name="response_to_item.24306" value="24310" id="show_item_form:elements:response_to_item.24306:24310" checked="checked" /> MD<br> <input type="radio" name="response_to_item.24306" value="24311" id="show_item_form:elements:response_to_item.24306:24311" /> PhD<br> <input type="radio" name="response_to_item.24306" value="24312" id="show_item_form:elements:response_to_item.24306:24312" /> ScD<br> <input type="radio" name="response_to_item.24306" value="24313" id="show_item_form:elements:response_to_item.24306:24313" /> PharmD<br> <input type="radio" name="response_to_item.24306" value="24314" id="show_item_form:elements:response_to_item.24306:24314" /> EdD<br> <input type="radio" name="response_to_item.24306" value="24315" id="show_item_form:elements:response_to_item.24306:24315" /> RN<br> <input type="radio" name="response_to_item.24306" value="24316" id="show_item_form:elements:response_to_item.24306:24316" /> Other/Additional (please specify below)<br> ************ I need to click the radio button based on the text right after it. Selenium allows me to click on a radio button by doing something like click //input[@value='24310'] but the problem is that the values of the checkboxes are dynamically generated, on the text after the dynamically generated radio button is not. Is there a way to have selenium select the radio button that precedes a matching string ? For example I want to select the radio button that corresponds to 'MD'. Thanks, Hamilton |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ajax, rich text areas and frames: 00047, Robin Becker |
|---|---|
| Next by Date: | RE: selecting text right after a radio button usingxpath: 00047, Guillaume Boudreau |
| Previous by Thread: | ajax, rich text areas and framesi: 00047, Hamilton Chua |
| Next by Thread: | RE: selecting text right after a radio button usingxpath: 00047, Guillaume Boudreau |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |