Created
March 19, 2015 10:16
-
-
Save ryansroberts/7f0e088e9f65f6241fe8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Element = | |
| E of IWebElement | |
let byId s (Element e) = e.GetElementById s | |
let byCss c (Element e) = e.SelectElements c | |
let interaction = Element -> unit | |
let click (Element e) = e.Click() | |
val bindPM<'a> : Element -> 'a | |
type Item { | |
Title of string | |
} | |
type Blog = { | |
Items of Item list | |
} | |
with static member from (Element e) = .. | |
type HomePage = { | |
Blog : Blog | |
ClickOnTheHeaderBar : interaction | |
} | |
with static member from (Element e) = { | |
Blog = Blog.from e | |
ClickOnTheMiddleWrapper = (fun () -> byId "middleWrapper" e |> click) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment