Skip to content

Commit

Permalink
test(suite_onboarding): fix tests for reviewer local machine
Browse files Browse the repository at this point in the history
- getattr added to get object property 
- detach AUT added in start application attempts
#9284
  • Loading branch information
Vladimir Druzhinin committed Apr 26, 2023
1 parent f77a4ad commit d96d652
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/ui-test/src/drivers/SquishDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def start_application(app_name: str, attempt = 2):
toplevelwindow.ToplevelWindow(squish.waitForObject(names.statusDesktop_mainWindow)).maximize()
except RuntimeError:
if attempt:
time.sleep(1)
[ctx.detach() for ctx in squish.applicationContextList()]
start_application(app_name, attempt-1)
else:
raise
Expand Down
2 changes: 1 addition & 1 deletion test/ui-test/src/drivers/elements/base_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def is_selected(self) -> bool:
@property
def is_visible(self) -> bool:
try:
return squish.waitForObject(self.object_name, 500).visible
return getattr(squish.findObject(self.object_name), 'visible', False)
except LookupError:
return False

Expand Down

0 comments on commit d96d652

Please # to comment.