- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8.6k
          [dotnet] Solidify nullability of PinnedScript, add test
          #14708
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
  
    [dotnet] Solidify nullability of PinnedScript, add test
  
  #14708
              Conversation
| PR Reviewer Guide 🔍Here are some key observations to aid the review process: 
 | 
| PR Code Suggestions ✨Explore these optional code suggestions: 
 
 | 
…/selenium into null-pinned-script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @RenderMichael !


User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Enforces nullability of the
PinnedScripttype, and adds a test. Luckily, much of the API surface ofPinnedScriptis internal, so this doesn't affect users at all.Adds some null checks.
Motivation and Context
Contributes to #14640
Adds a test for something hitherto without any.
Types of changes
Checklist
PR Type
enhancement, tests
Description
PinnedScriptand related parameters.ArgumentNullExceptionin several interfaces and classes.PinnedScriptto enable nullability and improve script handling logic.Changes walkthrough 📝
EventFiringWebDriver.cs
Add null check and exception documentation for ExecuteScriptdotnet/src/support/Events/EventFiringWebDriver.cs
PinnedScriptparameter.ArgumentNullExceptionforExecuteScriptmethod.IJavaScriptEngine.cs
Add null checks and exception documentation in IJavaScriptEnginedotnet/src/webdriver/IJavaScriptEngine.cs
scriptNameandscriptparameters.ArgumentNullExceptionfor relevant methods.JavaScriptEngine.cs
Add null checks and update script handling logicdotnet/src/webdriver/JavaScriptEngine.cs
scriptparameter.PinnedScript.cs
Enable nullability and refactor PinnedScript methodsdotnet/src/webdriver/PinnedScript.cs
WebDriver.cs
Add null check and exception documentation for WebDriverdotnet/src/webdriver/WebDriver.cs
PinnedScriptparameter.ArgumentNullExceptionforExecuteScriptmethod.IJavascriptExecutor.cs
Document ArgumentNullException for ExecuteScript methoddotnet/src/webdriver/IJavascriptExecutor.cs
ArgumentNullExceptionforExecuteScriptmethod.ISearchContext.cs
Document ArgumentNullException for FindElement methoddotnet/src/webdriver/ISearchContext.cs
ArgumentNullExceptionforFindElementmethod.ExecutingJavascriptTest.cs
Add test for pinning and executing JavaScript codedotnet/test/common/ExecutingJavascriptTest.cs