[Haskell-cafe] webdriver and click via executeJS
haskell at dshevchenko.biz
Fri Dec 11 17:48:09 UTC 2015
I use `webdriver` package for test automation with PhantomJS. And I need
to click some button, but not with a `click` function, but with a native
JS. I see a special function for such a task, `executeJS`, in the module
`Test.WebDriver.Commands`. So this is my code:
button <- findElement . ById $ "clearCart"
info <- elemInfo button
executeJS [JSArg info] "arguments.click();"
But I got a runtime error:
BadJSON "when expecting a (), encountered Null instead"
How can I fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe