Implement visible option for Page.waitFor method

This patch adds a 'visible' option to the Page.waitFor method, making
it possible to wait for the element to become actually visible.

References #89, #91.
This commit is contained in:
Andrey Lushnikov
2017-07-21 00:58:38 -07:00
parent 139b9e9b6d
commit 52de75742b
8 changed files with 117 additions and 55 deletions

View File

@@ -66,8 +66,16 @@ class JSOutline {
walker.walk(node.value.body);
}
const args = [];
for (let param of node.value.params)
args.push(new Documentation.Argument(this._extractText(param)));
for (let param of node.value.params) {
if (param.type === 'AssignmentPattern')
args.push(new Documentation.Argument(param.left.name));
else if (param.type === 'RestElement')
args.push(new Documentation.Argument('...' + param.argument.name));
else if (param.type === 'Identifier')
args.push(new Documentation.Argument(param.name));
else
this.errors.push('JS Parsing issue: cannot support parameter of type ' + param.type + ' in method ' + methodName);
}
let method = Documentation.Member.createMethod(methodName, args, hasReturn, node.value.async);
this._currentClassMembers.push(method);
return ESTreeWalker.SkipSubtree;