I am looking to access the element
and by
variables which are globally available in my test, but when I try to call them from a helper module required/imported by the test I get an undefined error. How can I import these variables directly?
Asked
Active
Viewed 258 times
0

Jason Waldrip
- 5,038
- 8
- 36
- 59
1 Answers
0
Make sure detox.init()
call happens earlier than you access those variables (element
, by
) because init method is the actual place where Detox globally exposes them.
After you call await detox.init(<your options>
), you'll be able to initialize your helpers.

noomorph
- 837
- 1
- 6
- 14