Get all options from Select Tag in Robot Framework

134 Views Asked by At

I want to get all options from Select tag & then iterate over the options to match the criteria & then select that option. Something like this: ${option_I_want} @{list_from_select_options}

FOR    ${each_option}    IN    @{list_from_select_options}
    IF    ${option_I_want} == ${each_option}
        select from list by label    ${each_option}
        BREAK
    ELSE
        Log    Not found
    END
END

I tried taking all options of select by xpath, like : xpath=//select[@id='someId']/option But I'm not getting all option values.

0

There are 0 best solutions below