Wednesday, 7 August 2013

select option value is not working

select option value is not working

Here's my test HTML:
<tr>
<td >
<select>
<option selected="selected" value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</td>
</tr>
and my code like
select_el=driver.find_element_by_xpath("//select")
Select(el_select).select_by_visible_text('1')
There's no error msg, but the option value is not changed? Any one can
give me some advice?

No comments:

Post a Comment