There is a common misunderstanding when the implicit wait time is set lower than the explicit wait:
var timeOut = 5000;
var search = element(by.xpath(`//*[@name='qwer']`));
browser.manage().timeouts().implicitlyWait(4000);
browser.ignoreSynchronization = true;
describe('Protractor Test', function () {
beforeEach(function () {
browser.get('https://www.google.com.ua');
});
it('EC', function () {
console.log('START');
// browser.sleep(timeOut);
browser.wait(protractor.ExpectedConditions.presenceOf(search), timeOut);
});
});
The total execution time with an implicitlyWait of 4000 milliseconds was 8.613 seconds. When the wait time is reduced by one second to 3000 milliseconds, the total execution time decreases to 6.865 seconds. How does this optimization work behind the scenes? Thank you in advance for any insights!