Fixing Flaky Automation Tests with Dynamic Waits