@qawolf/browser
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -20,3 +20,3 @@ "use strict"; | ||
exports.focusClear = (elementHandle) => __awaiter(void 0, void 0, void 0, function* () { | ||
logger_1.logger.verbose("actions.focusClear"); | ||
logger_1.logger.verbose("actions.focusClear: focus element"); | ||
yield elementHandle.focus(); | ||
@@ -29,2 +29,3 @@ const currentValue = yield elementHandle.evaluate((element) => { | ||
if (currentValue) { | ||
logger_1.logger.verbose("actions.focusClear: clearing value"); | ||
yield elementHandle.evaluate(() => document.execCommand("selectall", false, "")); | ||
@@ -56,5 +57,5 @@ yield elementHandle.press("Backspace"); | ||
} | ||
yield web_1.sleep(50); | ||
yield web_1.sleep(25); | ||
} | ||
}); | ||
//# sourceMappingURL=actions.js.map |
{ | ||
"name": "@qawolf/browser", | ||
"description": "qawolf browser manager", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "BSD-3.0", | ||
@@ -40,3 +40,3 @@ "main": "./lib/index.js", | ||
}, | ||
"gitHead": "ab0de314c354a4adb5889edd2a35a98ea7708798" | ||
"gitHead": "3904cf783aafd321df66a1b7af2d6c44ef7f5304" | ||
} |
@@ -15,3 +15,3 @@ import { logger } from "@qawolf/logger"; | ||
): Promise<void> => { | ||
logger.verbose("actions.focusClear"); | ||
logger.verbose("actions.focusClear: focus element"); | ||
await elementHandle.focus(); | ||
@@ -26,2 +26,4 @@ | ||
if (currentValue) { | ||
logger.verbose("actions.focusClear: clearing value"); | ||
// Select all so we replace the text | ||
@@ -77,4 +79,4 @@ // from https://github.com/GoogleChrome/puppeteer/issues/1313#issuecomment-471732011 | ||
await sleep(50); | ||
await sleep(25); | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89553
1582