SeleniumHQ / seleniumhq.github.io

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

Xpath note rearrangement #1884

Closed shbenzer closed 3 weeks ago

shbenzer commented 3 weeks ago

User description

I moved a note in the finders code examples for locating elements by xpath. The note about utilizing a .// vs // in parent vs children elements was in the wrong place

Description

moved note in finders.md for all translations

Motivation and Context

wanted to fix a mistake

Types of changes

Checklist


PR Type

documentation


Description


Changes walkthrough πŸ“

Relevant files
Documentation
_index.en.md
Add quitting examples to driver documentation                       

website_and_docs/content/documentation/webdriver/drivers/_index.en.md
  • Added code block references for quitting examples in multiple
    languages.
  • Updated documentation to include quitting examples.
  • +4/-0     
    _index.ja.md
    Add quitting examples to driver documentation                       

    website_and_docs/content/documentation/webdriver/drivers/_index.ja.md
  • Added code block references for quitting examples in multiple
    languages.
  • Updated documentation to include quitting examples.
  • +4/-0     
    _index.pt-br.md
    Add quitting examples to driver documentation                       

    website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md
  • Added code block references for quitting examples in multiple
    languages.
  • Updated documentation to include quitting examples.
  • +4/-0     
    _index.zh-cn.md
    Add quitting examples to driver documentation                       

    website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md
  • Added code block references for quitting examples in multiple
    languages.
  • Updated documentation to include quitting examples.
  • +4/-0     
    finders.en.md
    Rearrange XPATH usage note in finders documentation           

    website_and_docs/content/documentation/webdriver/elements/finders.en.md - Moved note about XPATH usage to a more relevant section.
    +1/-1     
    finders.ja.md
    Rearrange XPATH usage note in finders documentation           

    website_and_docs/content/documentation/webdriver/elements/finders.ja.md - Moved note about XPATH usage to a more relevant section.
    +1/-1     
    finders.pt-br.md
    Rearrange XPATH usage note in finders documentation           

    website_and_docs/content/documentation/webdriver/elements/finders.pt-br.md - Moved note about XPATH usage to a more relevant section.
    +1/-1     
    finders.zh-cn.md
    Rearrange XPATH usage note in finders documentation           

    website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md - Moved note about XPATH usage to a more relevant section.
    +1/-1     

    πŸ’‘ 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 be7df5c24e7eb3d8973eb24da63c16bf744b8f16
    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

    Incorrect Code Block
    The code block for CSharp is incorrectly referencing a Java file instead of a CSharp file. Incorrect Code Block
    The code block for CSharp is incorrectly referencing a Java file instead of a CSharp file. Incorrect Code Block
    The code block for CSharp is incorrectly referencing a Java file instead of a CSharp file. Incorrect Code Block
    The code block for CSharp is incorrectly referencing a Java file instead of a CSharp file.
    codiumai-pr-agent-pro[bot] commented 3 weeks ago

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Bug fix
    βœ… Replace the incorrect Java file path with the correct CSharp file path in the CSharp code block ___
    Suggestion Impact:The commit corrected the file path in the CSharp code block from a Java file path to a CSharp file path, aligning with the suggestion's intention. code diff: ```diff -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/HelloSelenium.cs#L13" >} ```
    ___ **The code block for CSharp is incorrectly using a Java file path. Replace it with the
    correct CSharp file path to ensure the proper code example is displayed for CSharp
    users.** [website_and_docs/content/documentation/webdriver/drivers/_index.en.md [70-73]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1884/files#diff-10ff84d69cea7383c29ebfd0e4934cda8a3d6111bfc937897b1f446c4f4781b5R70-R73) ```diff {{< tab header="CSharp" >}} -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/FirstScriptTest.cs#L29" >} {{< badge-code >}} {{< /tab >}} ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 9 Why: The suggestion correctly identifies a bug where a Java file path is used in a CSharp code block, which could confuse users. Replacing it with the correct CSharp file path is crucial for accuracy.
    9
    βœ… Replace the incorrect Java file path with the correct CSharp file path in the CSharp code block of the Japanese documentation ___
    Suggestion Impact:The commit corrected the file path in the CSharp code block from a Java path to a CSharp path, aligning with the suggestion's intention. code diff: ```diff {{< tab header="CSharp" >}} -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/HelloSelenium.cs#L13" >} ```
    ___ **The code block for CSharp is incorrectly using a Java file path. Replace it with the
    correct CSharp file path to ensure the proper code example is displayed for CSharp
    users in the Japanese documentation.** [website_and_docs/content/documentation/webdriver/drivers/_index.ja.md [69-72]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1884/files#diff-bfbaccc3ea80f5b819613809c7324862ee335c163d6e474b07a0d3aa7e48740eR69-R72) ```diff {{< tab header="CSharp" >}} -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/FirstScriptTest.cs#L29" >} {{< badge-code >}} {{< /tab >}} ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 9 Why: This suggestion addresses the same issue as the first, but in the Japanese documentation. Correcting the file path is essential for providing accurate examples to users.
    9
    βœ… Replace the incorrect Java file path with the correct CSharp file path in the CSharp code block of the Portuguese (Brazil) documentation ___
    Suggestion Impact:The commit corrected the file path in the CSharp code block, changing it from a Java file path to a CSharp file path, although the exact path used in the commit was different from the suggestion. code diff: ```diff -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/HelloSelenium.cs#L13" >} ```
    ___ **The code block for CSharp is incorrectly using a Java file path. Replace it with the
    correct CSharp file path to ensure the proper code example is displayed for CSharp
    users in the Portuguese (Brazil) documentation.** [website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md [70-73]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1884/files#diff-86b91e7aed382ec5c668cf7a26e77cc125d1b983696d9fa5962ce8c47c598fc9R70-R73) ```diff {{< tab header="CSharp" >}} -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/FirstScriptTest.cs#L29" >} {{< badge-code >}} {{< /tab >}} ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 9 Why: The suggestion is important for maintaining consistency and accuracy in the Portuguese (Brazil) documentation by correcting the file path for the CSharp code block.
    9
    βœ… Replace the incorrect Java file path with the correct CSharp file path in the CSharp code block of the Chinese (Simplified) documentation ___
    Suggestion Impact:The commit corrected the file path in the CSharp code block from a Java path to a CSharp path, aligning with the suggestion's intention. code diff: ```diff {{< tab header="CSharp" >}} -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/HelloSelenium.cs#L13" >} ```
    ___ **The code block for CSharp is incorrectly using a Java file path. Replace it with the
    correct CSharp file path to ensure the proper code example is displayed for CSharp
    users in the Chinese (Simplified) documentation.** [website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md [70-73]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1884/files#diff-271afe3b24802a1c6427f915a6ded1b3f370a63eda9ee97b38820971149f4563R70-R73) ```diff {{< tab header="CSharp" >}} -{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >} +{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/FirstScriptTest.cs#L29" >} {{< badge-code >}} {{< /tab >}} ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 9 Why: This suggestion is crucial for ensuring the Chinese (Simplified) documentation provides the correct CSharp code example, thereby preventing user confusion and maintaining documentation integrity.
    9
    shbenzer commented 3 weeks ago

    @harsha509 Completed