How to select all elements in the list box using Python selenium -
i can select single element present in list box of website using this,
select = select(browser.find_element_by_id("id"))
and can selected using select_by_visible_text method how can select items in list box(not combo box/drop down box) if select 1 item other deselected how select items in python
answer how figured out:
select = select(browser.find_element_by_id("ddlamc")) count = 0 o in select.options: print(o.text) if(count>1): select.select_by_visible_text(o.text) browser.save_screenshot("phase%d.png"%count) count+=1
Comments
Post a Comment