
11 Dec
2015
11 Dec
'15
12:48 p.m.
Hi there! 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[0].click();" ... But I got a runtime error: BadJSON "when expecting a (), encountered Null instead" How can I fix it? - Denis