I'm a Python newbie. I'm trying to make a py script to select a value from dropdown list. I tried to find a guideline on Youtube. But they only instruct how to get data from "option value=...". My trouble is there is no "option value=..." on the selection class that I'm try to get. Methods I tried and didn't work:
selectionbox.select_by_visible_text('Resolved')
find_element_by_xpath("....").click()
Their value are in arselmenu like below: (New/Assigned/In Progress/etc.)
<div class="selection" style="top:0px; left:117px; width:174px; height:21px;" arselmenu="[{v:"New"},{v:"Assigned"},{v:"In Progress"},{v:"Pending"},{v:"Resolved"},{v:"Closed"},{v:"Cancelled"}]">
<input id="arid_WIN_3_7" type="text" class="text " readonly="" style="top:0px; left:0px; width:153px; height:21px;" title="Pending">
<a href="javascript:" class="btn btn3d selectionbtn" style="top:0px; left:153px; width:21px; height:21px;">
<img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="">
</a>
</div>
Highly appreciate any advice. Best wishes.
*** Update: Hi @Endothermic, I tried using Javascript as your suggestion and got the code below:
Status_javaScript = "document.getElementById('arid_WIN_3_7').value='Resolved'" #Status - Resolved
driver.execute_script(Status_javaScript)
But it does not take effect when I click Save. I mean it does not change the value from "Pending" to "Resolved". It display like I changed the value but it's not. Any suggestion? Thank you.