test(onboarding): Select specific account was broken

Updated `findAccount` method since statement `When the user "xxx" logs in with password "xxx"` was broken due to `accountsList` iteration was wrong.
This commit is contained in:
Noelia 2023-01-20 15:44:32 +01:00 committed by Anthony Laibe
parent e3086fd52c
commit 289005c0e6
1 changed files with 5 additions and 4 deletions

View File

@ -38,9 +38,10 @@ class StatusAccountsScreen():
account_obj = None
[is_loaded, accountsList] = is_loaded_visible_and_enabled(SAccountsComponents.ACCOUNTS_POPUP.value)
if is_loaded:
for child in get_children_of_type(accountsList, "AccountMenuItemPanel"):
if(child.label == account):
account_obj = child
for index in range(accountsList.count):
a = accountsList.itemAt(index)
if(a.label == account):
account_obj = a
found = True
break
break
return found, account_obj