Make hardcoded wait times configurable
Noticed that there were three usleep() calls with hardcoded values (5000, 50000, 10000).
| MR | Where | Value | Discussion | Introduced in commit |
|---|---|---|---|---|
| No MR | \DMore\ChromeDriver\ChromeDriver::setTextTypeValue |
usleep(5000) |
b2cd4570 | |
| No MR | \DMore\ChromeDriver\ChromeDriver::wait |
usleep(10000) |
4907ae51 | |
| Handle clicking buttons with non-zero border ra... (!54 - merged) | \DMore\ChromeDriver\ChromeDriver::click |
usleep(50000) |
!54 (comment 69602592) | 75bbe1ef |
\DMore\ChromeDriver\ChromeDriver::switchToWindow |
$this->wait(2000, $condition); |
(Previously there was a usleep(100000) in \DMore\ChromeDriver\ChromeDriver::wait at 067dd6a7 but that was refactored to the one above.)
I think it makes more sense to make these a configurable value. The existing values for socketTimeout and domWaitTimeout are Chrome options, so I do not think we should re-use those. Currently thinking a new configuration value "microwait" and to refactor the usages above to use those.
Edited by Chris Burgess