Re: Urgent:Dynamic id problem in selenium ide

68 views
Skip to first unread message

kathu

unread,
Oct 14, 2008, 2:22:56 PM10/14/08
to selenium-users...@googlegroups.com
Hi   Santi

Thanks for your reply .Your answer was useful for me. Now iam using xpath command with unique id . But now i am having a new problem with dynamic value  change on dropdown list element .
My problem is i need to select second item  on the drop down list.so i gave like this xpath=//*[@id="newitem"].i know this wont select 2nd item in dropdown list .Is there any option?



Thanks
kathu

kathu

unread,
Oct 15, 2008, 10:31:04 AM10/15/08
to selenium-users...@googlegroups.com
Hi santi

I will explain my problem in detail.In  my page i have 3 dropdown list named company name,car model,engine model. company name will populate automatically.
But if iam selecting  model dropdown list "car model"  then only i can select engine model  and these items are generated dynamically.
my problem is i need to select the item2 in the dropdown list"car model"  .so that i will get the items in dropdown list "engine model" automatically while playing the script.
This my html code snippet
\\ <tr>\\ <td id="ext-gen149">\\ <div id="ext-gen150" class="gwt-Label" style="white-space: nowrap;">Organization:</div>\\ </td>\\ <td id="ext-gen141">\\ <div id="ext-gen77" class="x-form-field-wrap" style="width: 300px;">\\ <input id="newSession_org" class="x-form-text x-form-field x-combo-noedit" type="text" name="newSession_org" autocomplete="off" size="24" readonly="true" style="width: 283px;"/>\\ <img id="ext-gen78" class="x-form-trigger x-form-arrow-trigger" src="[http://webapp/gui/clear.cache.gif"/|http://webapp/gui/clear.cache.gif&quot;/]>\\ </div>\\ </td>\\ </tr>
<td id="ext-gen148">\\ <div id="ext-gen147" class="gwt-Label" style="white-space: nowrap;">Car Model:</div>\\ </td>
<td id="ext-gen139">\\ <div id="ext-gen89" class="x-form-field-wrap x-trigger-wrap-focus" style="width: 300px;">\\ <input id="newSessiontypes" class="x-form-text x-form-field x-combo-noedit x-form-focus" type="text" name="newSessiontypes" autocomplete="off" size="24" readonly="true" style="width: 283px;"/>\\ <img id="ext-gen90" class="x-form-trigger x-form-arrow-trigger" src="[http://web_app/gui/cleacache.gif"/|http://web_app/gui/cleacache.gif&quot;/]>\\ </div>\\ </td>\\ </tr>\\ <tr>\\ <td>\\ <div class="gwt-Label" style="white-space: nowrap;">Engine Model:</div>\\ </td>\\ <td id="ext-gen138">\\ <div id="ext-gen101" class="x-form-field-wrap" style="width: 300px;">\\ <input id="newSessionitems" class="x-form-text x-form-field x-combo-noedit" type="text" name="newSessionitems" autocomplete="off" size="24" readonly="true" style="width: 283px;"/>\\ <img id="ext-gen102" class="x-form-trigger x-form-arrow-trigger" src="[http://webapp/gui/cleacache.gif"/|http://webapp/gui/cleacache.gif&quot;/]>\\ </div>\\ </td>\\ </tr>

For me xpath=//*[@id="newSession_org"] is working fine because there only one item in the company&nbsp; dropdown list.




Thanks for the help\\ kathu

kathu

unread,
Oct 17, 2008, 6:03:08 PM10/17/08
to selenium-users...@googlegroups.com
Hi David


Thanks for the reply . I&nbsp; tried&nbsp; that command on selenium ide it didnt work. For me xpath=//*[@id="newSessiontypes"] is selecting the particular dropdown list with out error but its not selecting items in the dropdown list .So my question is whether i have to use selenium rc for this.if so how to include javascript into this selenium ide.&nbsp; Since this dropdown list&nbsp; items are dynamically generate its not selecting.


Thanks
kathu

Reply all
Reply to author
Forward
0 new messages