Skip to content

added ruby code in document #2306

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

pallavigitwork
Copy link
Member

@pallavigitwork pallavigitwork commented May 8, 2025

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.

added ruby code in document

Description

added ruby code in document

Motivation and Context

added ruby code in document

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

documentation


Description

  • Updated documentation to use Ruby code from test files

    • Replaced inline Ruby code with references to tested code blocks
    • Applied changes across English, Japanese, Portuguese, and Chinese docs
  • Minor cleanup in Ruby cookie spec tests

    • Removed redundant cookie existence assertions

Changes walkthrough 📝

Relevant files
Documentation
cookies.en.md
Use Ruby spec code blocks for documentation examples (EN)

website_and_docs/content/documentation/webdriver/interactions/cookies.en.md

  • Replaced inline Ruby code with references to Ruby spec code blocks
  • Ensured Ruby examples are consistent and up-to-date
  • Improved maintainability by linking to tested code
  • +10/-67 
    cookies.ja.md
    Reference Ruby spec code in documentation (JA)                     

    website_and_docs/content/documentation/webdriver/interactions/cookies.ja.md

  • Updated Ruby code examples to reference Ruby spec code blocks
  • Removed inline Ruby code for consistency
  • Ensured Japanese docs use tested Ruby code
  • +10/-67 
    cookies.pt-br.md
    Reference Ruby spec code in documentation (PT-BR)               

    website_and_docs/content/documentation/webdriver/interactions/cookies.pt-br.md

  • Switched Ruby code examples to use Ruby spec code blocks
  • Removed outdated inline Ruby code
  • Improved consistency in Portuguese docs
  • +10/-67 
    cookies.zh-cn.md
    Reference Ruby spec code in documentation (ZH-CN)               

    website_and_docs/content/documentation/webdriver/interactions/cookies.zh-cn.md

  • Updated Ruby code examples to reference Ruby spec code blocks
  • Removed inline Ruby code for Chinese docs
  • Ensured all Ruby examples are maintained in one place
  • +16/-65 
    Tests
    cookies_spec.rb
    Cleanup and streamline Ruby cookie spec tests                       

    examples/ruby/spec/interactions/cookies_spec.rb

  • Removed redundant assertions for cookie existence in tests
  • Minor cleanup for clarity and maintainability
  • +0/-4     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    netlify bot commented May 8, 2025

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit dac273d

    Copy link
    Contributor

    qodo-merge-pro bot commented May 8, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Error Handling

    The test for deleting a cookie expects a specific error (NoSuchCookieError) when trying to access a deleted cookie. This assumes specific error behavior that should be verified against the Selenium WebDriver documentation.

      expect { driver.manage.cookie_named('test1') }.to raise_error(Selenium::WebDriver::Error::NoSuchCookieError)
    end

    Copy link
    Contributor

    qodo-merge-pro bot commented May 8, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @pallavigitwork
    Copy link
    Member Author

    macos failure not related to code example shared.

    @pallavigitwork pallavigitwork self-assigned this May 8, 2025
    @pallavigitwork
    Copy link
    Member Author

    the mac os failure has nothing to do with this PR.

    @pallavigitwork pallavigitwork merged commit adb8b76 into SeleniumHQ:trunk May 8, 2025
    13 of 17 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants