Fork me on GitHub
#kaocha
<
2019-05-01
>
rgm20:05:00

I’m still working through trying to use etaoin with kaocha-cucumber for browser testing. I had the semi-bright idea of using regular kaocha pre-run and post-run hooks to start and stop the webdriver (which starts and stops a Chrome/FF instance) assoc it into the test plan and then… well, I need a reference to the live driver in the step definitions in order to fill in forms, etc.

rgm20:05:09

oh, hold on. Maybe a Before hook would work to get it into the state param for all the steps

rgm20:05:58

Nope, I clearly have the wrong end of the stick here.

rgm20:05:39

Is there a normal way to have something sitting in state for my cucumber step definitions to use?

rgm22:05:03

well, for the moment I’ve just stuck it in a defonce’d atom that gets reset! in a pre-test hook and it seems to work. I guess my more general question is, is there some way to access current global test plan state from Cucumber step definitions?

rgm22:05:14

(and, in what ways is this a terrible idea?)