-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Updated Design Patterns And Development Strategies' Example Scripts #1949
Updated Design Patterns And Development Strategies' Example Scripts #1949
Conversation
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @shbenzer,
Thank you for the PR.
I understand the need to update the locators as the current ones are outdated.
However, the additional changes seem to be related to issue template
updates, which might not be necessary in this context. Including them could also make the code sample appear larger than required.
It would be great if we could focus solely on updating the locators according to the template, while keeping the page objects unchanged.
Please let me know your thoughts!
Thanks,
Sri
website_and_docs/content/documentation/test_practices/design_strategies.en.md
Outdated
Show resolved
Hide resolved
website_and_docs/content/documentation/test_practices/design_strategies.en.md
Outdated
Show resolved
Hide resolved
I'm not 100% sure I understand what you mean. Are you saying to instead just change the current functions to be relevant to the new page, but not add functions for everything on the new page, so that we can keep the same number of functions and the example doesn't change significantly in length? |
@harsha509 would you mind expanding on your comments here? |
Hi @shbenzer, Yes, we can proceed by fixing the existing issue rather than adding new functions. Additionally, there are a couple of things I do not understand. For example, the locator issue_form_operating-system is not present on the page SeleniumHQ Issue Submission. Could you please clarify this? Thank you. |
@harsha509 Gotcha
The old code is based on what we access by clicking "Get Started" next to Bug Report. Since not only has SeleniumHQ Issue Submission changed to let you pick which issue you're creating, the page we originally utilized has also changed to have more and different fields ("what happened", "what operating system are you using", "log output", etc.). The issue_form_operating-system locator is for the "Operating System: What host operating system are you using to run Selenium?" form field. |
Understood now! The new additions are from different pages and has different url's https://github.com/SeleniumHQ/selenium/issues Since this is just an example for the page object of a single page (https://github.com/SeleniumHQ/selenium/issues/new), I think changes related to this page should be enough. |
@harsha509 If that's the case, may I change the link from https://github.com/SeleniumHQ/selenium/issues/new to https://github.com/SeleniumHQ/selenium/issues/new?assignees=&labels=I-defect%2Cneeds-triaging&projects=&template=bug-report.yml&title=%5B%F0%9F%90%9B+Bug%5D%3A+? Otherwise I think I'll have to make more changes than you're recommending. |
I thought to suggest the same initially, |
Just so I'm clear - would that mean the following changes:
This way we would only need one page object and can make the least amount of changes to the page. |
Yes, that works too. The main goal is to help users understand the Page Object Model. |
Cool, I'll try to knock that out tonight or tomorrow if I can |
@harsha509 So I ran into a problem and created a new solution... let me know what you think In order to illustrate PageFactory's ability to locate elements with the same name/id of the field I had to shift the site to Bug Report so that the EditIssue class can still have the following:
This is different than what we discussed. Since the only ids on the old page contained hyphens, I couldn't use them as variable names in java, plus they would have had to be the tabs to Pull Requests, Issues, etc. and wouldn't have really fit the example anyway. Let me know what you think since this does still increase the size of the example a tad. However, the example focuses on a single website for the page object model like page objects should. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @shbenzer !
User description
Design patterns and development strategies' example scripts were outdated, so I updated them to reflect the new changes.
Description
updated index.md in all languages with new code examples
Motivation and Context
Github updated https://github.com/SeleniumHQ/selenium/issues/new, and since Design patterns and development strategies uses the page for its example scripts, those scripts needed to be updated.
Types of changes
Checklist
PR Type
enhancement
Description
setSummary
andenterDescription
with new methods for setting various issue form fields.setTitle
,setWhatHappened
,setHowToReproduce
,setLogOutput
,setOperatingSystem
,setSeleniumVersion
,setBrowserVersion
,setDriverVersion
, andsetUsingGrid
.Changes walkthrough 📝
design_strategies.en.md
Update issue form handling methods in English documentation
website_and_docs/content/documentation/test_practices/design_strategies.en.md
setSummary
andenterDescription
with new methods.design_strategies.ja.md
Update issue form handling methods in Japanese documentation
website_and_docs/content/documentation/test_practices/design_strategies.ja.md
setSummary
andenterDescription
with new methods.design_strategies.pt-br.md
Update issue form handling methods in Portuguese documentation
website_and_docs/content/documentation/test_practices/design_strategies.pt-br.md
setSummary
andenterDescription
with new methods.design_strategies.zh-cn.md
Update issue form handling methods in Chinese documentation
website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md
setSummary
andenterDescription
with new methods.