3 ms·
We can do this with Canopy in F# (repl/interactive style too!): //go to url url "http://lefthandedgoat.github.io/canopy/testpages/" //assert that
by aloisdg 7y ago
We can do this with Canopy in F# (repl/interactive style too!):
//go to url
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"
click "#button"
"#button_clicked" == "button clicked"
https://lefthandedgoat.github.io/canopy/ https://lefthandedgoat.github.io/canopy/
- Dontrememberit 7y agoThe idea of this library is exactly to not use HTML ids (or css paths etc), but use instructions you could give to an human browsing the web (enter the page, press tab, type this..)
- holtalanm 7y agothe problem with that is anything that can 'detect' an html element based on human-language will eventually fail to find something described with human-language due to crappy html on legacy systems.