diff --git a/lib/FrameManager.js b/lib/FrameManager.js index 031fc71d..26e5179f 100644 --- a/lib/FrameManager.js +++ b/lib/FrameManager.js @@ -977,7 +977,7 @@ class WaitTask { this._frame = frame; this._polling = polling; this._timeout = timeout; - this._predicateBody = helper.isString(predicateBody) ? 'return ' + predicateBody : 'return (' + predicateBody + ')(...args)'; + this._predicateBody = helper.isString(predicateBody) ? 'return (' + predicateBody + ')' : 'return (' + predicateBody + ')(...args)'; this._args = args; this._runCount = 0; frame._waitTasks.add(this);