SeleniumHQ / seleniumhq.github.io

Official Selenium website and documentation
https://selenium.dev
Apache License 2.0
1.07k stars 1.27k forks source link

Update Custom Node Initialization in Grid Advanced Features #1729

Closed josh-pinwheelapi closed 3 months ago

josh-pinwheelapi commented 3 months ago

User description

Thanks for contributing to the Selenium site and documentation! A PR well described will help maintainers to review and merge it quickly

Description

With this change, the Node constructor now requires a the sessionTimeout argument. Updating code sample to pass it along to the DecoratedLoggingNode constructor.

Motivation and Context

Current example will error out with the following error:

constructor Node in class org.openqa.selenium.grid.node.Node cannot be applied to given types;
62.49 [ERROR]   required: org.openqa.selenium.remote.tracing.Tracer,org.openqa.selenium.grid.data.NodeId,java.net.URI,org.openqa.selenium.grid.security.Secret,java.time.Duration
62.49 [ERROR]   found: org.openqa.selenium.remote.tracing.Tracer,org.openqa.selenium.grid.data.NodeId,java.net.URI,org.openqa.selenium.grid.security.Secret
62.49 [ERROR]   reason: actual and formal argument lists differ in length

Types of changes

Checklist


PR Type

bug_fix, enhancement


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
customize_node.en.md
Update Node Initialization to Include Session Timeout       

website_and_docs/content/documentation/grid/advanced_features/customize_node.en.md
  • Updated the constructor of DecoratedLoggingNode to include
    sessionTimeout parameter.
  • Adjusted the create method to fetch sessionTimeout from NodeOptions
    and pass it to the constructor.
  • +6/-3     
    customize_node.ja.md
    Update Node Initialization to Include Session Timeout       

    website_and_docs/content/documentation/grid/advanced_features/customize_node.ja.md
  • Updated the constructor of DecoratedLoggingNode to include
    sessionTimeout parameter.
  • Adjusted the create method to fetch sessionTimeout from NodeOptions
    and pass it to the constructor.
  • +8/-5     
    customize_node.pt-br.md
    Update Node Initialization to Include Session Timeout       

    website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md
  • Updated the constructor of DecoratedLoggingNode to include
    sessionTimeout parameter.
  • Adjusted the create method to fetch sessionTimeout from NodeOptions
    and pass it to the constructor.
  • +8/-5     
    customize_node.zh-cn.md
    Update Node Initialization to Include Session Timeout       

    website_and_docs/content/documentation/grid/advanced_features/customize_node.zh-cn.md
  • Updated the constructor of DecoratedLoggingNode to include
    sessionTimeout parameter.
  • Adjusted the create method to fetch sessionTimeout from NodeOptions
    and pass it to the constructor.
  • +8/-5     

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    netlify[bot] commented 3 months ago

    Deploy Preview for selenium-dev ready!

    Name Link
    Latest commit d8fd52211b67e6d441d4b549d6fc40b28ea54a45
    Latest deploy log https://app.netlify.com/sites/selenium-dev/deploys/6647937d1da23b00085d308e
    Deploy Preview https://deploy-preview-1729--selenium-dev.netlify.app
    Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    CLAassistant commented 3 months ago

    CLA assistant check
    All committers have signed the CLA.

    codiumai-pr-agent-pro[bot] commented 3 months ago

    PR Description updated to latest commit (https://github.com/SeleniumHQ/seleniumhq.github.io/commit/36524f7d426fb09787ffb8750604729eddcbf536)

    codiumai-pr-agent-pro[bot] commented 3 months ago

    PR Review ๐Ÿ”

    โฑ๏ธ Estimated effort to review [1-5] 2, because the changes are straightforward and consistent across multiple documentation files. The PR modifies the constructor of a class to include an additional parameter and updates the method calls accordingly.
    ๐Ÿงช Relevant tests No
    โšก Possible issues Typo in Parameter: In the English version of the file, the constructor parameter `registrationSecretm` should be `registrationSecret`. This typo could lead to compilation errors or unexpected behavior.
    ๐Ÿ”’ Security concerns No
    codiumai-pr-agent-pro[bot] commented 3 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Possible bug
    Correct a typo in the parameter name to ensure code consistency and correctness ___ **Correct the typo in the parameter name registrationSecretm to registrationSecret in the
    constructor of DecoratedLoggingNode.** [website_and_docs/content/documentation/grid/advanced_features/customize_node.en.md [98-100]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1729/files#diff-26dd9e1ce0f611040fb6fdd019d9c40892f87ee8ae0ad95cfbf9630ce4597ba7R98-R100) ```diff -protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecretm, Duration sessionTimeout) { +protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret, Duration sessionTimeout) { super(tracer, nodeId, uri, registrationSecret, sessionTimeout); } ```
    Suggestion importance[1-10]: 10 Why: The suggestion correctly identifies and fixes a typo in the parameter name from `registrationSecretm` to `registrationSecret`, which is crucial for the code to function correctly.
    10