possible to select multiple options with xpath?

nokogiri, xpath

Solution

Did you mean `or`?

/html/body/form/select/option[@val = '1' or @val = '3']

That should select both elements. By using `and` you're trying to select an element whose `val` is both `1` and `3`, which isn't going to work. :-)

Problem

``` /html/body/form/select/option[@val = '1' and @val = '3'] ``` so that means select the first and third option in a select-multiple form ?

Original source