We are using browser.wait extensively throughout the entire test suite. It became a headache when managing different timeouts for different scenarios. I came across a waitReady function(https://gist.github.com/elgalu/2939aad2b2e31418c1bb), but I am unable to utilize it in my code. The directory looks like: (all files besides each other) .
├── conf.js
├── main.js
├── waitReady.js
Main.js --->Contains all describe and it blocks
require('./waitReady.js');
describe(...){
it{
code...
expect(element.waitReady()).toBeTruthy();
};
});
For some reason the code does not find that function and my code keeps getting function not defined error. Do I need to initialize it somewhere?