Explicit Waits are highly recommended to be used instead of hardcoded time delays. But, Explicit Waits still require a timeout value to be specified.
The Story
Up until now, we've typically used 5, 10 or 20 seconds using our own judgement of the speed of the functionality under test which has the "human bias" component unfortunately.
The problem though arose when we've started to execute tests on different servers against different instances of our application which brought extra impacts of the network and different performances of the servers.
Then, we've started to increase wait timeouts here and there to counteract network speed and slow application performance.
The problem is, now, when there is an actual timeout failure, sometimes we wait for much longer than it is actually needed making the feedback turnaround slower.
The Question
What considerations should we take into account when choosing Explicit Wait timeout values?
We've also thought about developing a system of weights for different instances of our application, which would dynamically adjust all the timeouts we are using inside the test automation codebase. Would really appreciate if someone would share experience doing something similar.