-1

I want to select an option from list, but I won't use value for it.

  <tbody>
   <tr>
      <td colspan="3"><a href="admin.php?dpt=catalog&amp;sub=products_categories&amp;categoryID=0" class="bold">Корень</a> (385)</td>
   </tr>
   <tr>
      <td valign="middle">
         <input class="position_input" type="text" name="position[162]" size="2" value="0">
         <a href="admin.php?dpt=catalog&amp;sub=products_categories&amp;categoryID=162" class="bold">VIP игрушки</a>
      </td>
      <td>(0)</td>
      <td align="right">
         <font color="red">[</font><a class="small" href="javascript:open_window('category.php?c_id=162&w=0',500,700);">edit</a><font color="red">]</font>
      </td>
   </tr>
   <tr>
      <td valign="middle">
         &nbsp;&nbsp;&nbsp;&nbsp;    <input class="position_input" type="text" name="position[174]" size="2" value="1">
         <a href="admin.php?dpt=catalog&amp;sub=products_categories&amp;categoryID=174">hh</a>
      </td>
      <td>(1)</td>
      <td align="right">
         <font color="red">[</font><a class="small" href="javascript:open_window('category.php?c_id=174&w=162',500,700);">edit</a><font color="red">]</font>
      </td>
   </tr>
   <tr>
  • 1
    The code you have here doesn't give enough information to answer this question. What value are you trying to select, and what are the steps you need to take to make the selection? If you are trying to select the text from a dropdown in a popup and make sure it correctly updates the parent page, we need that information to help you. – Kate Paulk Jul 3 '14 at 11:07
  • Your question is hard to understand. You told us what you want to do but haven't asked any real question. Are you asking us to write a complete test case for you? What does this have to do with robotframework, which you've included as a tag? – Bryan Oakley Aug 9 '14 at 12:26
1

Please add your HTML code properly so we can look into this. Please go through the below links.

Select option

Selenium2Library

  • Thanks, but this example is using value. It is to easy for me :) – Bogdan Kostritskyy Jul 3 '14 at 3:32
  • I'm sorry, Sachin, but this doesn't actually answer the question. It has a comment (request for more info) and just some links. Would you be able to provide a working example? – corsiKa Jul 3 '14 at 20:39
  • Waiting for inputs from "@BogdanKostritskyy" on kate Paulk comments. He can also use different select options in his code. – Sachin Jul 5 '14 at 3:55
  • @Bogdan Kostritskyy: Could you please update as per "Kate Paulk" comments :).. – Sachin Jul 5 '14 at 4:11
0
<tr bgcolor="#E1E1E1">
<td class="queryCriteria">Quick Dates: </td>
<td class="queryCriteria">
<select id="createdQuickDate_Customers" name="createdQuickDate">
<option selected="" value="none">Select Date</option>
<option value="today">Today</option>
<option value="yesterday">Yesterday</option>
<option value="currentWeek">Current Week</option>
<option value="currentMonth">Current Month</option>
<option value="lastWeek">Last Week</option>
<option value="lastMonth">Last Month</option>
</select>
</td>
<td class="queryCriteria"/>
<td class="queryCriteria"/>
<td class="queryCriteria"/>
</tr>

for above HTML code finding xpath of Today dropdown:

  1. Click Element xpath=//select[@name="createdQuickDate"]/option[@value='today']
  2. Select From List xpath=//select[@name="createdQuickDate"]/option[@value='today']

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.