question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`RunScript` command adds a script section or not?

See original GitHub issue

💬 Questions and Help

Hey there I was reading a spec of selenium commands and discovered run script I starting to think if it any different from execute script according to the doc it is. c

Creates a new “script” tag in the body of the current test window, and adds the specified text into the body of the command. Beware that JS exceptions thrown in these script tags aren’t managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.

But from what I see in the code is just the same as exec script (I may be wrong), except not saving a returned value?

https://github.com/SeleniumHQ/selenium/blob/64447d4b03f6986337d1ca8d8b6476653570bcc1/dotnet/src/webdriverbackedselenium/Internal/SeleniumEmulation/RunScript.cs#L27-L55

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
diemolcommented, Jun 16, 2021

I see you are struggling a bit with the issue tracket, which we only use for actual issues and not questions 😃

However, SeleneseCommand is a type of command used in Selenium RC1, which is more than 10 years old and is not supported anymore. Some people still used as they have not been able to migrate, so that’s why you find those pieces of code in the code base.

0reactions
zhiburtcommented, Jun 16, 2021

https://www.selenium.dev/documentation/en/webdriver/browser_manipulation/#execute-script

But it’s execScript not runScript which is a supported command in side files

Read more comments on GitHub >

github_iconTop Results From Across the Web

RunScript command adds a script section or not? #9585
Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the...
Read more >
How to run custom script in workflow run script block
The easy way to do this is to create a rest message in the ServiceNow and use it in the script section. Simple...
Read more >
Running custom scripts during a build - Apple Developer
To add files or file lists to your script, click the Add button (+) in the appropriate section of your Run Script build...
Read more >
RunScript | Altium Designer 21 User Manual | Documentation
Summary. This command is used to run a script within Altium Designer. Access. This command is accessed by choosing the File » Run...
Read more >
npm-run-script
Description. This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found