-
Notifications
You must be signed in to change notification settings - Fork 57
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
First Feedback #1
Comments
Thank you very much for the feedback! You raised some very interesting points. Here are a few quick thoughts: Multiple browser supportMultiple browser support should work out of the box using selenium2library's "switch browser" keyword. For example, here's how you can interact with two browsers at once:
Is that good enough, or do you need something more? I suppose we could add a Default implementation of
|
More from my side, partially still braindumping without too much consideration Before that some background info that hopefully helps to understand why I'm trying to do
I.e. the work-split would roughly be PageObjects are implemented by the Multiple Browser SupportMy idea was to abstract/hide the selenium stuff as much as possible, Send Chat Message | Hello, I have a problem | user_session Send Chat Message | Hello, how can I help? | agent_session Send Chat Message | Test sending a link: this page is broken: http://blabla... | user_session Send Chat Message | Test multiline chat message: Let me check\nyeah, it's broken | agent_session Send Chat Message | Test sending a trouble ticker ID: your trouble ticket ID is #1 | agent_session In other words: yeah As part of the "hide selenium" idea, I'm also hiding the opening Initialize Browser | alias=agent_session | browser=firefox | page_object=HelpdeskLoginPage | proxy=False Initialize Browser | alias=user_session | browser=firefox | page_object=SelfcareLoginPage | proxy=False Maybe something like this would also be useful for the PageObjectLibrary? Default implementation of _is_current_pageWell, this is kind of design principle thing:
My approach would be the latter, because I feel that a library should do as much as possible. Sub pages and switching page objects without waiting for page transitionFirst of all, I find it important that all "page transition" scenarios i.e.
should be integrated with the contextmanager. I.e. after a page transition the user Both of your proposals sound good but I can't say which one would be better. Using Using Or maybe hide this somehow so that the PageObject knows whether it's a full page or For example, this looks good: search for | user_name=DummyUser* switch to page object | UserSearchResults open record | DummyUser1 switch to page object | UserAccoutnDetails deactivate user but this looks even better search for | user_name=DummyUser* open record | DummyUser1 deactivate user But I'm not so sure whether the latter makes sense:
At the moment I'm experimenting with the contextmanager with additional def type_user_name(self, user): self._se2lib.input_text("Email", user) with self._wait_for_page_refresh(stale_check=False): self._se2lib.click_element("next") Anyway, I'll imlpement more use cases to get more hands-on experiences on what kind of scenarios there could be for the page objects... Adding ROOT_URLright, I didn't consider the production vs. test environment point. I was too focused
|
Syncing with latest Upstream changes
This is some sort of braindump just to start some discussion i.e. I can open issues and/or PR's based on the outcome of the discussion...
I've been now trying the Library for a couple of days and I'm pretty happy about it. I especially like:
I chose rather complex Use Case to see what is possible and what is not: "Password Reset" i.e.
This use case has a couple tricky things:
The Braindump in no particular order:
The Current Page Should Be
should beCurrent Page Should Be
RF KWs in general do not use "The" e.g. The BuiltIn hasVariable Should Exist
KW, notThe Variable Should Exist
The text was updated successfully, but these errors were encountered: