Open thezimmee opened 6 years ago
Hi @holmescn, thank you for using chromy.
Basically your code seems to have a problem. But I'm curious of the part of the code. where are onStartCallback() and onEndCallback() defined? The function passed to .evaluate() is executed with browser context. So can't call a function or variable in nodejs context.
The chain is implemented by async-chain-proxy package. You can check the behavior of chain by accessing this package directly.
@dotneet would it be possible to pass data to evaluate like this:
await chromy.evaluate((data) => {window.blah(data)});
Edit: or is there another way?
Hi @aabbccsmith,
evaluate can receive arguments. https://github.com/OnetapInc/chromy/blob/master/test/evaluate.js#L52
Hello. Thank you for
chromy
, I can't wait to get it running. I am trying to write a thin wrapper around it to pass some config to tell it to run certain test and/or screenshots. So I'm trying to conditionally call different chromy methods, but I don't see any examples that show using chromy not in a chain. I also can't find any documentation for what thechain()
method actually does. To be clear, I would like to do something like this:The reason I need to do something like this is to be able to pass config to conditionally do certain things and call certain callbacks methods which allow the user config to interact with chromy. I'm missing something because I'm getting various errors, a common one being:
How can I accomplish what I am trying to do? I appreciate your help.