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

Added Scope feature to timeout, retry_assertion and strice_mode #2319

Merged
merged 12 commits into from
Sep 23, 2022

Conversation

Snooz82
Copy link
Member

@Snooz82 Snooz82 commented Sep 21, 2022

With this feature a scope is added to the following keywords:

With that scope argument one can set the "live time" of that setting.
Available Scopes are: Global, Suite and Test/Task

Live Times:

  • A Global scope will live forever until it is overwritten by another Global scope.
  • A Suite scope will locally override the Global scope and live until the end of the Suite within it is set, or if it is overwritten by a later setting with Global or same scope. Children suite does inherit the setting from the parent suite but also may have its own local Suite setting that then will be inherited to its children suites.
  • A Test or Task scope will be inherited from its parent suite but when set, lives until the end of that particular test or task.

A new set higher order Scope will always remove the lower order scope which may be in charge.
So the setting of a Suite scope from a test, will set that scope to the robot file suite where that test is and removes the Test scope that has been in place.

Bugfixes:

if self._auto_closing_level == AutoClosingLevel.TEST:
try:
self._execution_stack.append(self.get_browser_catalog())
except ConnectionError as e:
logger.debug(f"Browser._start_test connection problem: {e}")

def _start_keyword(self, name, attrs):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is just moved and unaltered from the lower part of that file, so that it is in a better place between start and end test

@@ -509,6 +509,7 @@ def get_selected_options(
option_attribute: SelectAttribute = SelectAttribute.label,
assertion_operator: Optional[AssertionOperator] = None,
*assertion_expected,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message argument was just missing...

@Snooz82 Snooz82 force-pushed the topic/WaitForCondition branch from f95480b to c522fa3 Compare September 21, 2022 13:05
@Snooz82 Snooz82 force-pushed the topic/WaitForCondition branch from 1a4c54d to 263a60b Compare September 22, 2022 20:15
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
Signed-off-by: René Rohner <snooz@posteo.de>
@Snooz82 Snooz82 force-pushed the topic/WaitForCondition branch from 6acb9cb to 6adfed5 Compare September 23, 2022 18:34
Signed-off-by: René Rohner <snooz@posteo.de>
@Snooz82 Snooz82 marked this pull request as ready for review September 23, 2022 18:47
@Snooz82 Snooz82 self-assigned this Sep 23, 2022
@Snooz82 Snooz82 added this to the v14.0.0 milestone Sep 23, 2022
@Snooz82 Snooz82 merged commit 64eeaa4 into main Sep 23, 2022
@Snooz82 Snooz82 deleted the topic/WaitForCondition branch September 23, 2022 19:20
@Snooz82 Snooz82 added enhancement New feature or request priority: high labels Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch Page fails when context and browser id are given as well.
2 participants