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

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -