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

Xpath note rearrangement #1884

Merged
merged 8 commits into from
Aug 22, 2024
Merged

Conversation

shbenzer
Copy link
Contributor

@shbenzer shbenzer commented Aug 22, 2024

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

  • 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 code block references for quitting examples in multiple languages across driver documentation.
  • Moved the note about utilizing XPATH from the current element to a more relevant section in the finders documentation.
  • Ensured consistency in documentation across different translations.

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

    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 be7df5c

    @codiumai-pr-agent-pro codiumai-pr-agent-pro bot added documentation Improvements or additions to documentation Review effort [1-5]: 2 labels 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

    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.

    Copy link
    Contributor

    codiumai-pr-agent-pro bot commented Aug 22, 2024

    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:

    -{< 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]

     {{< 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:

     {{< 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]

     {{< 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:

    -{< 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]

     {{< 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:

     {{< 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]

     {{< 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
    Copy link
    Contributor Author

    @harsha509 Completed

    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 0fde8cc into SeleniumHQ:trunk Aug 22, 2024
    3 checks passed
    selenium-ci added a commit that referenced this pull request Aug 22, 2024
    * added quitting examples for all lanaguges/translations
    
    * fixed xpath child note being in wrong place of code example
    
    * Update _index.en.md w/ csharp example
    
    * Update _index.ja.md w/ csharp example
    
    * Update _index.pt-br.md w/ csharp example
    
    * Update _index.zh-cn.md w/ csharp example 0fde8cc
    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