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

Method executeScript

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

@override

(script, ...args)

Source from the content-addressed store, hash-verified

820
821 /** @override */
822 executeScript(script, ...args) {
823 if (typeof script === 'function') {
824 script = 'return (' + script + ').apply(null, arguments);'
825 }
826
827 if (script && script instanceof PinnedScript) {
828 return this.execute(
829 new command.Command(command.Name.EXECUTE_SCRIPT)
830 .setParameter('script', script.executionScript())
831 .setParameter('args', args),
832 )
833 }
834
835 return this.execute(
836 new command.Command(command.Name.EXECUTE_SCRIPT).setParameter('script', script).setParameter('args', args),
837 )
838 }
839
840 /** @override */
841 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