Comparing version 6.1.3 to 6.1.7
@@ -10,2 +10,6 @@ "use strict"; | ||
var _path = _interopRequireDefault(require("path")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
async function elementSendKeys({ | ||
@@ -23,4 +27,13 @@ elementId, | ||
const page = this.getPageHandle(); | ||
await page.keyboard.type(text); | ||
const tagName = await (await elementHandle.getProperty('tagName')).jsonValue(); | ||
const type = await (await elementHandle.getProperty('type')).jsonValue(); | ||
if (tagName === 'INPUT' && type === 'file') { | ||
const paths = (text || '').split('\n').map(p => _path.default.resolve(p)); | ||
await elementHandle.uploadFile(...paths); | ||
} else { | ||
await page.keyboard.type(text); | ||
} | ||
return null; | ||
} |
{ | ||
"name": "devtools", | ||
"version": "6.1.3", | ||
"version": "6.1.7", | ||
"description": "A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer", | ||
@@ -45,3 +45,3 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
}, | ||
"gitHead": "f7b43b2fab60bf87b49352957b28709cc63a7f66" | ||
"gitHead": "bde6507d480acb07da6868d624ee714096b15956" | ||
} |
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
83638
2049