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

added shadow dom documentation to finders in all translations #1070 #1887

Merged
merged 6 commits into from
Aug 26, 2024

Conversation

shbenzer
Copy link
Contributor

@shbenzer shbenzer commented Aug 22, 2024

User description

Fixed Bug #1070

Description

added shadow dom documentation to finders in all translations, thereby fixing Bug #1070

Motivation and Context

make documentation more comprehensive

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

  • Added comprehensive documentation for evaluating the Shadow DOM across multiple languages (English, Japanese, Portuguese, and Chinese).
  • Included code examples for Java, Python, CSharp, and Ruby to demonstrate accessing the Shadow DOM.
  • Highlighted the requirement for Selenium 4.0 or greater to use the shadow root methods.

Changes walkthrough 📝

Relevant files
Documentation
finders.en.md
Add Shadow DOM documentation and examples in English         

website_and_docs/content/documentation/webdriver/elements/finders.en.md

  • Added documentation for evaluating the Shadow DOM.
  • Included code examples for Java, Python, CSharp, and Ruby.
  • Highlighted the requirement for Selenium 4.0 or greater.
  • +32/-0   
    finders.ja.md
    Add Shadow DOM documentation and examples in Japanese       

    website_and_docs/content/documentation/webdriver/elements/finders.ja.md

  • Added Shadow DOM documentation in Japanese.
  • Provided code examples for multiple programming languages.
  • Mentioned Selenium version requirement.
  • +32/-0   
    finders.pt-br.md
    Add Shadow DOM documentation and examples in Portuguese   

    website_and_docs/content/documentation/webdriver/elements/finders.pt-br.md

  • Introduced Shadow DOM documentation in Portuguese.
  • Included examples for Java, Python, CSharp, and Ruby.
  • Noted the need for Selenium 4.0 or greater.
  • +32/-0   
    finders.zh-cn.md
    Add Shadow DOM documentation and examples in Chinese         

    website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md

  • Added Shadow DOM documentation in Chinese.
  • Provided code examples for several languages.
  • Highlighted Selenium version requirement.
  • +32/-0   

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

    Copy link

    netlify bot commented Aug 22, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit 6771308

    @shbenzer shbenzer changed the title added shadow dom documentation to finders in all translations #1070 added shadow dom documentation to finders.md in all translations #1070 Aug 22, 2024
    @qodo-merge-pro qodo-merge-pro bot added the documentation Improvements or additions to documentation label Aug 22, 2024
    @qodo-merge-pro qodo-merge-pro bot changed the title added shadow dom documentation to finders.md in all translations #1070 added shadow dom documentation to finders in all translations #1070 Aug 22, 2024
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Missing Translation
    The new section "Evaluating the Shadow DOM" is only in English. It should be translated to other languages.

    Untranslated Content
    The new section "Evaluating the Shadow DOM" is in English instead of Japanese.

    Untranslated Content
    The new section "Evaluating the Shadow DOM" is in English instead of Portuguese.

    Untranslated Content
    The new section "Evaluating the Shadow DOM" is in English instead of Chinese.

    Copy link
    Contributor

    qodo-merge-pro bot commented Aug 22, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Add code examples for JavaScript and Kotlin in the Shadow DOM section

    Consider adding a brief explanation or example for the JavaScript and Kotlin tabs,
    as they are currently empty. This will provide a more complete set of examples for
    users of all supported languages.

    website_and_docs/content/documentation/webdriver/elements/finders.en.md [137-140]

     {{< tab header="JavaScript" >}}
    +const shadowHost = driver.findElement(By.css('#shadow_host'));
    +const shadowRoot = shadowHost.getShadowRoot();
    +const shadowContent = shadowRoot.findElement(By.css('#shadow_content'));
     {{< /tab >}}
     {{< tab header="Kotlin" >}}
    +val shadowHost = driver.findElement(By.cssSelector("#shadow_host"))
    +val shadowRoot = shadowHost.getShadowRoot()
    +val shadowContent = shadowRoot.findElement(By.cssSelector("#shadow_content"))
     {{< /tab >}}
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Adding examples for JavaScript and Kotlin fills in the missing content, providing a complete set of examples for all supported languages, which is highly beneficial for users.

    9
    Localization
    Translate the Shadow DOM explanation to Japanese for consistency

    Translate the "Evaluating the Shadow DOM" section into Japanese to maintain
    consistency with the rest of the document and improve readability for Japanese
    users.

    website_and_docs/content/documentation/webdriver/elements/finders.ja.md [104-106]

    -### Evaluating the Shadow DOM
    +### Shadow DOMの評価
     
    -The Shadow DOM is an encapsulated DOM tree hidden inside an element. With the release of v96 in Chromium Browsers, Selenium can now allow you to access this tree with easy-to-use shadow root methods. NOTE: These methods require Selenium 4.0 or greater.
    +Shadow DOMは要素内に隠されたカプセル化されたDOMツリーです。Chromiumブラウザのv96のリリースにより、Seleniumは使いやすいshadow rootメソッドを使用してこのツリーにアクセスできるようになりました。注意:これらのメソッドにはSelenium 4.0以上が必要です。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Translating the section into Japanese improves accessibility and consistency for Japanese-speaking users, aligning with the rest of the document.

    8
    Translate the Shadow DOM explanation to Portuguese for consistency

    Translate the "Evaluating the Shadow DOM" section into Portuguese to maintain
    consistency with the rest of the document and improve readability for
    Portuguese-speaking users.

    website_and_docs/content/documentation/webdriver/elements/finders.pt-br.md [107-109]

    -### Evaluating the Shadow DOM
    +### Avaliando o Shadow DOM
     
    -The Shadow DOM is an encapsulated DOM tree hidden inside an element. With the release of v96 in Chromium Browsers, Selenium can now allow you to access this tree with easy-to-use shadow root methods. NOTE: These methods require Selenium 4.0 or greater.
    +O Shadow DOM é uma árvore DOM encapsulada oculta dentro de um elemento. Com o lançamento do v96 nos navegadores Chromium, o Selenium agora permite que você acesse essa árvore com métodos de shadow root fáceis de usar. NOTA: Esses métodos requerem Selenium 4.0 ou superior.
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Providing a translation into Portuguese enhances readability and consistency for Portuguese-speaking users, maintaining the document's accessibility.

    8
    Translate the Shadow DOM explanation to Chinese for consistency

    Translate the "Evaluating the Shadow DOM" section into Chinese to maintain
    consistency with the rest of the document and improve readability for Chinese users.

    website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md [110-112]

    -### Evaluating the Shadow DOM
    +### 评估Shadow DOM
     
    -The Shadow DOM is an encapsulated DOM tree hidden inside an element. With the release of v96 in Chromium Browsers, Selenium can now allow you to access this tree with easy-to-use shadow root methods. NOTE: These methods require Selenium 4.0 or greater.
    +Shadow DOM是隐藏在元素内部的封装DOM树。随着Chromium浏览器v96版本的发布,Selenium现在可以让您使用易于使用的shadow root方法访问这个树。注意:这些方法需要Selenium 4.0或更高版本。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Translating the section into Chinese ensures consistency and improves readability for Chinese-speaking users, making the document more accessible.

    8

    @shbenzer
    Copy link
    Contributor Author

    thank you @titusfortner for the great blog reference!

    @shbenzer shbenzer requested a review from harsha509 August 26, 2024 12:42
    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.

    Thank you @shbenzer !

    @harsha509 harsha509 merged commit bb164c3 into SeleniumHQ:trunk Aug 26, 2024
    3 checks passed
    selenium-ci added a commit that referenced this pull request Aug 26, 2024
    …1887)[deploy site]
    
    * added shadow dom documentation to finders in all translations
    
    * reduced line-count
    
    * reduced line-count
    
    * reduced line-count
    
    * reduced line-count
    
    ---------
    
    Co-authored-by: Sri Harsha <[email protected]> bb164c3
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    documentation Improvements or additions to documentation Review effort [1-5]: 2
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants