我正在尝试使用 F# 和 Canopy 编写一个简单的刮板(请参阅http://lefthandedgoat.github.io/canopy/)。我正在尝试从具有“.application-tile”类的所有元素中提取文本。但是,在下面的代码中,我收到以下构建错误,但我不明白。
This expression was expected to have type
OpenQA.Selenium.IWebElement -> 'a
but here has type
OpenQA.Selenium.IWebElement
知道为什么会这样吗?谢谢!
open canopy
open runner
open System
[<EntryPoint>]
let main argv =
start firefox
"taking canopy for a spin" &&& fun _ ->
url "https://abc.com/"
// Login Page
"#i0116" << "abc@abc.com"
"#i0118" << "abc"
click "#abcButton"
// Get the Application Tiles -- BUILD ERROR HAPPENS HERE
elements ".application-tile" |> List.map (fun tile -> (tile |> (element ".application-name breakWordWrap"))) |> ignore
run()