SeleniumHQ / seleniumhq.github.io

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

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

Closed shbenzer closed 2 weeks ago

shbenzer commented 3 weeks ago

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

Checklist


PR Type

Documentation


Description


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

    netlify[bot] commented 3 weeks ago

    Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    Latest commit 677130830734acb95d1c092530c334f00e2e7784
    codiumai-pr-agent-pro[bot] commented 3 weeks ago

    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.
    codiumai-pr-agent-pro[bot] commented 3 weeks ago

    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]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1887/files#diff-e21fb1eabd6a7eaf605f8f733ad4e5406d5ad60908a37a6da9b2c363c021ceaeR137-R140) ```diff {{< 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]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1887/files#diff-c047d3fd7654069cb4ca13dcf34df864532041dd9a03abced9f295402313e42cR104-R106) ```diff -### 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]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1887/files#diff-eaadee9340583f10ee129591af6c74011a61c7535fb37bbd08c77bd6afaae437R107-R109) ```diff -### 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]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1887/files#diff-eab325a79563cf7c8c85aecf2de106c1cf35ff7b191245b1cf7eac5cfed1d6deR110-R112) ```diff -### 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 commented 3 weeks ago

    thank you @titusfortner for the great blog reference!