@camperaid/watest 2.4.4 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/webdriver/driver.js +28 -0
package/package.json
CHANGED
package/webdriver/driver.js
CHANGED
|
@@ -902,6 +902,34 @@ else {
|
|
|
902
902
|
});
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
+
//
|
|
906
|
+
// Clipboard
|
|
907
|
+
//
|
|
908
|
+
|
|
909
|
+
clipboardIs(value, msg) {
|
|
910
|
+
return this.matchScriptRetval({
|
|
911
|
+
script: `window.navigator.clipboard.readText()`,
|
|
912
|
+
expected: value,
|
|
913
|
+
msg,
|
|
914
|
+
test: got => test_is(got, value, { ignore_unexpected: true }),
|
|
915
|
+
is_matched: got =>
|
|
916
|
+
is(got, value, `${msg}, clipboard value`, {
|
|
917
|
+
ignore_unexpected: true,
|
|
918
|
+
}),
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
getClipboardText() {
|
|
923
|
+
return this.executeScript(
|
|
924
|
+
`window.navigator.clipboard.readText()`,
|
|
925
|
+
`Read clipboard text`
|
|
926
|
+
);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
//
|
|
930
|
+
// DOM: elements count and visibility, focus.
|
|
931
|
+
//
|
|
932
|
+
|
|
905
933
|
/**
|
|
906
934
|
* Waits until elements count matches.
|
|
907
935
|
*/
|