Skip to content
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

Incorrect Hugo syntax fixed, for driver.quit() #2003

Merged

Conversation

harshitBhardwaj97
Copy link
Contributor

@harshitBhardwaj97 harshitBhardwaj97 commented Oct 17, 2024

User description

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

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.

Description

In Quitting session section, on drivers page, due to incorrect hugo syntax the driver.quit() was not being displayed for Java, Dotnet, JS and Kotlin. Fixed this issue, made the changes in all the supported language files, local verification done after the fixes. Fixes #2002. Video attached showing the fixes -

seleniumIssue.2002.mp4

Motivation and Context

This change was required, because it shows how can we use driver.quit() in various language bindings.

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

Bug fix, Documentation


Description

  • Fixed incorrect Hugo syntax in the "Quitting Sessions" section for Java, CSharp, JavaScript, and Kotlin, ensuring proper rendering of the driver.quit() command.
  • Updated the CSharp code reference to point to the correct file examples/dotnet/SeleniumDocs/GettingStarted/FirstScript.cs.
  • Improved formatting for better readability across multiple language documentation files.

Changes walkthrough 📝

Relevant files
Bug fix
_index.en.md
Correct Hugo syntax and update CSharp code reference         

website_and_docs/content/documentation/webdriver/drivers/_index.en.md

  • Fixed incorrect Hugo syntax for code blocks in multiple languages.
  • Updated CSharp code reference path to the correct file.
  • Improved formatting for better readability.
  • +9/-8     
    _index.ja.md
    Correct Hugo syntax and update CSharp code reference         

    website_and_docs/content/documentation/webdriver/drivers/_index.ja.md

  • Fixed incorrect Hugo syntax for code blocks in multiple languages.
  • Updated CSharp code reference path to the correct file.
  • +6/-7     
    _index.pt-br.md
    Correct Hugo syntax and update CSharp code reference         

    website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md

  • Fixed incorrect Hugo syntax for code blocks in multiple languages.
  • Updated CSharp code reference path to the correct file.
  • Improved formatting for better readability.
  • +9/-8     
    _index.zh-cn.md
    Correct Hugo syntax and update CSharp code reference         

    website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md

  • Fixed incorrect Hugo syntax for code blocks in multiple languages.
  • Updated CSharp code reference path to the correct file.
  • +5/-6     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    In Quitting session section, on drivers page, due to
    incorrect hugo syntax the driver.quit() was not being
    displayed for Java, Dotnet, JS and Kotlin. Fixed this issue,
    made the changes in all the supported language files, local
    verification done after the fixes.
    
    Fixes SeleniumHQ#2002
    Copy link

    netlify bot commented Oct 17, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit 4149953

    @qodo-merge-pro qodo-merge-pro bot added documentation Improvements or additions to documentation Bug fix labels Oct 17, 2024
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ✅

    2002 - Fully compliant

    Fully compliant requirements:

    • Fix incorrect hugo syntax for Java, CSharp, JavaScript and Kotlin languages in the "Quitting Sessions" section
    • Update CSharp/dotnet code reference to the correct file
    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Formatting Consistency
    Verify that the formatting changes, such as line breaks and indentation, are consistent across all language files and do not affect the rendered output.

    Translation Accuracy
    Ensure that the changes made to the Japanese version maintain the correct translation and meaning of the original content.

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Clarify the distinction between 'quit' and 'close' methods to improve user understanding

    Consider adding a brief explanation of the difference between quit and close methods
    to provide more context for users.

    website_and_docs/content/documentation/webdriver/drivers/_index.en.md [60-61]

    -Important note: the `quit` method is different from the `close` method,
    -and it is recommended to always use `quit` to end the session
    +Important note: the `quit` method is different from the `close` method.
    +While `close` only closes the current window, `quit` ends the entire session and releases associated resources.
    +It is recommended to always use `quit` to properly end the session and prevent resource leaks.
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion provides a useful clarification on the difference between 'quit' and 'close' methods, which enhances user understanding and helps prevent potential resource leaks. This addition is relevant and improves the documentation's clarity.

    7
    Add explanation of 'quit' and 'close' methods in Japanese for better comprehension

    Add an explanation about the difference between quit and close methods in Japanese
    to provide more context for Japanese users.

    website_and_docs/content/documentation/webdriver/drivers/_index.ja.md [60-63]

    +重要な注意点: `quit`メソッドは`close`メソッドとは異なります。
    +`close`は現在のウィンドウのみを閉じますが、`quit`はセッション全体を終了し、関連リソースを解放します。
    +リソースリークを防ぐため、セッションを適切に終了するには常に`quit`を使用することをお勧めします。
    +
     {{< tabpane text=true >}}
     {{< tab header="Java" >}}
     {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >}}
     {{< /tab >}}
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: This suggestion mirrors the previous one but in Japanese, offering the same valuable clarification for Japanese users. It enhances the documentation by explaining the difference between 'quit' and 'close' methods, improving comprehension and preventing resource mismanagement.

    7

    💡 Need additional feedback ? start a PR chat

    Copy link
    Member

    @harsha509 harsha509 left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Good Catch 🚀
    Thank you @harshitBhardwaj97 !

    @harsha509 harsha509 merged commit 584cc1c into SeleniumHQ:trunk Oct 17, 2024
    3 checks passed
    @harshitBhardwaj97
    Copy link
    Contributor Author

    Thanks for the kind words @harsha509.

    selenium-ci added a commit that referenced this pull request Oct 17, 2024
    In Quitting session section, on drivers page, due to
    incorrect hugo syntax the driver.quit() was not being
    displayed for Java, Dotnet, JS and Kotlin. Fixed this issue,
    made the changes in all the supported language files, local
    verification done after the fixes.
    
    Fixes #2002
    
    Co-authored-by: Sri Harsha <[email protected]> 584cc1c
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Bug fix documentation Improvements or additions to documentation Review effort [1-5]: 2
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [🐛 Bug]: Incorrect hugo syntax found in Webdriver > Driver > Quitting Sessions section.
    2 participants