open canopy
open runner
start firefox
"taking canopy for a spin" &&& fun _ ->
url "http://lefthandedgoat.github.io/canopy/testpages/"
// Get the tds in tr
let results = elements "#value_list td" |> List.map read
//or print them using iter
elements "#value_list td"
|> List.iter (fun element -> System.Console.WriteLine(read element))
run()
That should do what you want.
canopy has function called 'read' that takes in either a selector or an element. Since you have all of them from 'elements "selector"' you can map read over the list.
List.map takes in a function, runs it, and returns a list of results. (in C# its like elements.Select(x => read(x)) List.iter is the same as .foreach(x => System.Console.Writeline(read(x))