1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41:

//these are similar to C# using statements open canopy . runner . classic open canopy . configuration open canopy . classic canopy . configuration . chromeDir <- System . AppContext . BaseDirectory //start an instance of chrome chrome //this is how you define a test "taking canopy for a spin" &&& fun _ -> //this is an F# function body, it's whitespace enforced //go to url "http://lefthandedgoat.github.io/canopy/testpages/" //assert that the element with an id of 'welcome' has //the text 'Welcome' "#welcome" == "Welcome" //assert that the element with an id of 'firstName' has the value 'John' "#firstName" == "John" //change the value of element with //an id of 'firstName' to 'Something Else' "#firstName" << "Something Else" //verify another element's value, click a button, //verify the element is updated "#button_clicked" == "button not clicked" "#button" "#button_clicked" == "button clicked" //run all tests ( ) "press [enter] to exit" . Console . ReadLine ( ) |> ( )