Comparing version 6.10.0 to 6.10.2
import type DevToolsDriver from '../devtoolsdriver'; | ||
export default function elementClick(this: DevToolsDriver, { elementId }: { | ||
elementId: string; | ||
}): Promise<any>; | ||
}): Promise<unknown>; | ||
//# sourceMappingURL=elementClick.d.ts.map |
@@ -7,6 +7,4 @@ "use strict"; | ||
const getElementTagName_1 = __importDefault(require("./getElementTagName")); | ||
const executeScript_1 = __importDefault(require("./executeScript")); | ||
const constants_1 = require("../constants"); | ||
const selectOption_1 = __importDefault(require("../scripts/selectOption")); | ||
const utils_1 = require("../utils"); | ||
const SELECT_SCRIPT = 'return (function select (elem) { elem.selected = true }).apply(null, arguments)'; | ||
async function elementClick({ elementId }) { | ||
@@ -20,6 +18,3 @@ const page = this.getPageHandle(); | ||
if (tagName === 'option') { | ||
return executeScript_1.default.call(this, { | ||
script: SELECT_SCRIPT, | ||
args: [{ [constants_1.ELEMENT_KEY]: elementId }] | ||
}); | ||
return page.$eval('html', selectOption_1.default, elementHandle); | ||
} | ||
@@ -26,0 +21,0 @@ return new Promise((resolve, reject) => { |
{ | ||
"name": "devtools", | ||
"version": "6.10.0", | ||
"version": "6.10.2", | ||
"description": "A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer", | ||
@@ -41,3 +41,3 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
}, | ||
"gitHead": "f7968c4d925835a2a971bbf9c0f4fdb3911ec8d9" | ||
"gitHead": "450c3daebe5f8c5bb4420a764c57d7366efaa1e9" | ||
} |
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
136450
234
2465