Closed shbenzer closed 3 weeks ago
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | 19f216bd1a8664bddd7178a2c0ae2fd85f18f110 |
β±οΈ Estimated effort to review: 2 π΅π΅βͺβͺβͺ |
π§ͺ No relevant tests |
π No security concerns identified |
β‘ Key issues to review Inconsistent Formatting Inconsistent indentation in code examples across different languages Untranslated Content New "Utilizing Locators" section is not translated in non-English versions |
Category | Suggestion | Score |
Enhancement |
Improve the clarity and correctness of the explanation for utilizing locators___ **The explanation for utilizing locators contains a typo and an incomplete sentence.Consider revising the text to improve clarity and correctness.** [website_and_docs/content/documentation/webdriver/elements/locators.en.md [335]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1880/files#diff-bad5c08d78f84e8bd7528d1a2a3181973375147d3f8bc5b9678cfce7dbe76aabR335-R335) ```diff -The FindElement makes using locators a breeze! For most languages, all you need to do is utilize `webdriver.common.by.By`, however in others it's as simple as setting a parameter in the FindElement function> +The FindElement method makes using locators a breeze! For most languages, all you need to do is utilize `webdriver.common.by.By`. However, in others, it's as simple as setting a parameter in the FindElement function. ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 8Why: Correcting the typo and incomplete sentence enhances the clarity and professionalism of the documentation, which is crucial for user understanding. | 8 |
Add explanations for each locator method to provide context and improve understanding___ **Consider adding a brief explanation or example for each locator method shown in thecode snippets to provide more context and help users understand when to use each method.** [website_and_docs/content/documentation/webdriver/elements/locators.en.md [337-343]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1880/files#diff-bad5c08d78f84e8bd7528d1a2a3181973375147d3f8bc5b9678cfce7dbe76aabR337-R343) ```diff {{< tabpane langEqualsHeader=true >}} {{< badge-examples >}} {{< tab header="Java" >}} + // Using className to locate an element with the CSS class "information" import org.openqa.selenium.By; WebDriver driver = new ChromeDriver(); - driver.findElement(By.className("information")); + driver.findElement(By.className("information")); {{< /tab >}} ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 6Why: Adding explanations for each locator method would improve user understanding, but the existing examples are functional without them. | 6 | |
Best practice |
Standardize indentation in code examples for better readability___ **Consider using consistent indentation for the code examples. Currently, some linesare indented with tabs and others with spaces. Standardizing the indentation will improve readability and maintainability of the documentation.** [website_and_docs/content/documentation/webdriver/elements/locators.en.md [316-317]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1880/files#diff-bad5c08d78f84e8bd7528d1a2a3181973375147d3f8bc5b9678cfce7dbe76aabR316-R317) ```diff var driver = new ChromeDriver(); - driver.FindElement(By.Xpath("//input[@value='f']")); +driver.FindElement(By.Xpath("//input[@value='f']")); ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 7Why: The suggestion to standardize indentation improves readability and maintainability, which is important for documentation clarity, but it is not a critical issue. | 7 |
Ensure consistency or explain differences in naming conventions across language examples___ **Ensure consistency in the code examples across different programming languages. Forinstance, the Python example uses snake_case for method names, while other languages use camelCase. Consider standardizing the naming conventions or explaining the differences.** [website_and_docs/content/documentation/webdriver/elements/locators.en.md [344-348]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1880/files#diff-bad5c08d78f84e8bd7528d1a2a3181973375147d3f8bc5b9678cfce7dbe76aabR344-R348) ```diff {{< tab header="Python" >}} from selenium.webdriver.common.by import By driver = webdriver.Chrome() - driver.find_element(By.CLASS_NAME, "information") + # Note: Python uses snake_case for method names + driver.find_element(By.CLASS_NAME, "information") {{< /tab >}} ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 7Why: Highlighting the differences in naming conventions across languages is helpful for users, but it is not essential for the functionality of the examples. | 7 |
User description
For Bug #1393 , I added a section in Locator Strategies describing how the By class works and how to import/utilize it in selenium scripts in multiple languages
Description
added "Utilizing Locators" section in Locator Strategies for each translation added code examples for importing the
by
class and using it in FindElementMotivation and Context
Bug Ticket
Types of changes
Checklist
PR Type
documentation
Description
By
class in Selenium scripts across different programming languages.Changes walkthrough π
locators.en.md
Add "Utilizing Locators" section with examples
website_and_docs/content/documentation/webdriver/elements/locators.en.md
By
class in various languages.locators.ja.md
Add "Utilizing Locators" section with examples
website_and_docs/content/documentation/webdriver/elements/locators.ja.md
By
class in multiple languages.locators.pt-br.md
Add "Utilizing Locators" section with examples
website_and_docs/content/documentation/webdriver/elements/locators.pt-br.md
By
class in various languages.locators.zh-cn.md
Add "Utilizing Locators" section with examples
website_and_docs/content/documentation/webdriver/elements/locators.zh-cn.md
By
class in multiple languages.