How do you select an option or set the value in a select list that has option groups?
This method does not work: How to change a dropdown in an F# Canopy UI Testing Script
sample code:
<!DOCTYPE html>
<html>
<body>
<select id="test-select">
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
</body>
</html>
Canopy Test:
open canopy
open runner
open Helpers
let all() =
context "OptGroup Tests"
let page = ""
ntest ("Testing page " + page) (fun _ ->
let mUrl = testpage.html
url mUrl
"#test-select" << "Audi"
)