MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / executeScript

Method executeScript

javascript/selenium-webdriver/lib/webdriver.js:819–835  ·  view source on GitHub ↗

@override

(script, ...args)

Source from the content-addressed store, hash-verified

817
818 /** @override */
819 executeScript(script, ...args) {
820 if (typeof script === 'function') {
821 script = 'return (' + script + ').apply(null, arguments);'
822 }
823
824 if (script && script instanceof PinnedScript) {
825 return this.execute(
826 new command.Command(command.Name.EXECUTE_SCRIPT)
827 .setParameter('script', script.executionScript())
828 .setParameter('args', args),
829 )
830 }
831
832 return this.execute(
833 new command.Command(command.Name.EXECUTE_SCRIPT).setParameter('script', script).setParameter('args', args),
834 )
835 }
836
837 /** @override */
838 executeAsyncScript(script, ...args) {

Callers 1

logMutationEventsMethod · 0.95

Calls 3

executeMethod · 0.95
setParameterMethod · 0.80
executionScriptMethod · 0.45

Tested by

no test coverage detected