diff --git a/test/appium/tests/atomic/account_management/test_profile.py b/test/appium/tests/atomic/account_management/test_profile.py index dc9da2f22f..c6b7b4e685 100644 --- a/test/appium/tests/atomic/account_management/test_profile.py +++ b/test/appium/tests/atomic/account_management/test_profile.py @@ -543,6 +543,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): device_1_home = device_1.create_user() device_1_home.profile_button.click() device_1_profile = device_1_home.get_profile_view() + device_1_profile.privacy_and_security_button.click() device_1_profile.backup_recovery_phrase_button.click() device_1_profile.ok_continue_button.click() recovery_phrase = device_1_profile.get_recovery_phrase() @@ -553,12 +554,12 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): message_before_sync = 'sent before sync' message_after_sync = 'sent after sync' - # device 1: add contact, start 1-1 chat with basic user + device_1.just_fyi('add contact, start 1-1 chat with basic user') device_1_chat = device_1_home.add_contact(basic_user['public_key']) device_1_chat.chat_message_input.send_keys(message_before_sync) device_1_chat.send_message_button.click() - # device 2: go to profile > Devices, set device name, discover device 2 to device 1 + device_2.just_fyi('go to profile > Devices, set device name, discover device 2 to device 1') device_2_home = device_2.recover_access(passphrase=' '.join(recovery_phrase.values())) device_2_profile = device_2_home.get_profile_view() device_2_profile.discover_and_advertise_device(device_2_name) @@ -567,21 +568,22 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): device_1_profile.sync_all_button.click() device_1_profile.sync_all_button.wait_for_visibility_of_element(15) - # device 2: check that contact is appeared in Contact list + device_2.just_fyi('check that contact is appeared in Contact list') + device_2_profile.back_button.click() device_2_profile.back_button.click() device_2_profile.contacts_button.scroll_to_element(9, 'up') device_2_profile.contacts_button.click() if not device_2_profile.element_by_text(basic_user['username']).is_element_displayed(): self.errors.append('"%s" is not found in Contacts after initial sync' % basic_user['username']) - # device 1: send message to 1-1 chat with basic user and add another contact + device_1.just_fyi('send message to 1-1 chat with basic user and add another contact') device_1_chat.get_back_to_home_view() device_1_chat.chat_message_input.send_keys(message_after_sync) device_1_chat.send_message_button.click() device_1_chat.back_button.click() device_1_home.add_contact(transaction_senders['A']['public_key']) - # device 2: check that messages appeared in 1-1 chat and new contacts are synced + device_2.just_fyi('check that messages appeared in 1-1 chat and new contacts are synced') if not device_2_profile.element_by_text(transaction_senders['A']['username']): self.errors.append( '"%s" is not found in Contacts after adding when devices are paired' % transaction_senders['A'][ diff --git a/test/appium/views/base_element.py b/test/appium/views/base_element.py index ea8504b874..d67ad7d353 100644 --- a/test/appium/views/base_element.py +++ b/test/appium/views/base_element.py @@ -159,12 +159,13 @@ class BaseElement(object): def attribute_value(self, value): attribute_value = self.find_element().get_attribute(value) - if attribute_value == 'true' or 'True': - return True - elif attribute_value == 'false' or 'False': - return False + if attribute_value.lower() == 'true': + attribute_state = True + elif attribute_value.lower() == 'false': + attribute_state = False else: - return attribute_value + attribute_state = attribute_value + return attribute_state def is_element_image_equals_template(self, file_name: str = ''): if file_name: