Answers for "python all option"

0

python all option

from selenium import webdriver

browser = webdriver.Firefox()

select_box = browser.find_element_by_name("month") 

options = [x for x in select_box.find_elements_by_tag_name("option")]

for element in options:
    print element.get_attribute("value")
Posted by: Guest on December-13-2020
0

python all option

WebElement element = driver.findElement(By.id(""));
Select select = new Select(element);
List<WebElement> list = select.getOptions();
for(int i=0; i<list.size(); i++)        
    {
        System.out.println(list.get(i).getText());
    }
Posted by: Guest on December-13-2020

Code answers related to "python all option"

Python Answers by Framework

Browse Popular Code Answers by Language