1
0
mirror of synced 2026-08-05 15:06:54 +00:00

chore: roll driver, support new hasAttribute(name) (#1041)

This commit is contained in:
Yury Semikhatsky
2022-08-31 12:37:31 -07:00
committed by GitHub
parent 321673407a
commit 6b842e0d50
16 changed files with 210 additions and 168 deletions
@@ -725,7 +725,12 @@ class Method extends Element {
String type = p.type.formatTypeFromUnion(overloadIndex);
argList.add("int".equals(type) ? "0" : "(" + type + ") null");
} else {
argList.add("int".equals(p.toJava()) ? "0" : "null");
String defaultValue = "null";
// TODO: it should probably be done for all methods that have name#1, name#2 etc overloads.
if ("LocatorAssertions.hasAttribute".equals(jsonPath)) {
defaultValue = "(" + p.type.toJava() + ") " + defaultValue;
}
argList.add(defaultValue);
}
continue;
}