mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(FrameManager): improve waiting for selector to be hidden error message (#2911)
Fixes #2854
This commit is contained in:
committed by
Andrey Lushnikov
parent
14e69d189c
commit
3d12f1f279
@@ -728,7 +728,8 @@ class Frame {
|
||||
const waitForHidden = !!options.hidden;
|
||||
const polling = waitForVisible || waitForHidden ? 'raf' : 'mutation';
|
||||
const timeout = helper.isNumber(options.timeout) ? options.timeout : 30000;
|
||||
return new WaitTask(this, predicate, `${isXPath ? 'XPath' : 'selector'} "${selectorOrXPath}"`, polling, timeout, selectorOrXPath, isXPath, waitForVisible, waitForHidden).promise;
|
||||
const title = `${isXPath ? 'XPath' : 'selector'} "${selectorOrXPath}"${waitForHidden ? ' to be hidden' : ''}`;
|
||||
return new WaitTask(this, predicate, title, polling, timeout, selectorOrXPath, isXPath, waitForVisible, waitForHidden).promise;
|
||||
|
||||
/**
|
||||
* @param {string} selectorOrXPath
|
||||
|
||||
Reference in New Issue
Block a user