2018-01-14 17:43:36 +00:00
|
|
|
from views.base_element import BaseButton, BaseEditBox
|
2018-01-03 09:34:40 +00:00
|
|
|
from views.base_view import BaseView
|
|
|
|
|
|
|
|
|
2018-05-25 17:29:07 +00:00
|
|
|
class StatusTestDAppButton(BaseButton):
|
2018-01-03 09:34:40 +00:00
|
|
|
|
|
|
|
def __init__(self, driver):
|
2018-05-25 17:29:07 +00:00
|
|
|
super(StatusTestDAppButton, self).__init__(driver)
|
|
|
|
self.locator = self.Locator.text_selector('Status Test DApp')
|
2018-01-03 09:34:40 +00:00
|
|
|
|
|
|
|
def navigate(self):
|
2018-05-25 17:29:07 +00:00
|
|
|
from views.web_views.status_test_dapp import StatusTestDAppView
|
|
|
|
return StatusTestDAppView(self.driver)
|
2018-01-03 09:34:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PlusButton(BaseButton):
|
|
|
|
def __init__(self, driver):
|
|
|
|
super(PlusButton, self).__init__(driver)
|
|
|
|
self.locator = self.Locator.xpath_selector(
|
|
|
|
"//android.widget.TextView[@text='+']")
|
|
|
|
|
|
|
|
|
|
|
|
class PublicKeyEditBox(BaseEditBox):
|
|
|
|
def __init__(self, driver):
|
|
|
|
super(PublicKeyEditBox, self).__init__(driver)
|
2018-03-15 20:01:08 +00:00
|
|
|
self.locator = self.Locator.accessibility_id('enter-contact-code-input')
|
2018-01-03 09:34:40 +00:00
|
|
|
|
|
|
|
|
2018-07-20 08:27:33 +00:00
|
|
|
class ScanContactCodeButton(BaseEditBox):
|
|
|
|
def __init__(self, driver):
|
|
|
|
super(ScanContactCodeButton, self).__init__(driver)
|
|
|
|
self.locator = self.Locator.accessibility_id('scan-contact-code-button')
|
|
|
|
|
|
|
|
|
2018-01-03 09:34:40 +00:00
|
|
|
class ConfirmPublicKeyButton(BaseButton):
|
|
|
|
def __init__(self, driver):
|
|
|
|
super(ConfirmPublicKeyButton, self).__init__(driver)
|
|
|
|
self.locator = \
|
|
|
|
self.Locator.xpath_selector('(//android.view.ViewGroup[@content-desc="icon"])[2]')
|
|
|
|
|
|
|
|
|
|
|
|
class ContactsView(BaseView):
|
|
|
|
|
|
|
|
def __init__(self, driver):
|
|
|
|
super(ContactsView, self).__init__(driver)
|
|
|
|
self.driver = driver
|
|
|
|
|
|
|
|
self.plus_button = PlusButton(self.driver)
|
|
|
|
self.public_key_edit_box = PublicKeyEditBox(self.driver)
|
2018-07-20 08:27:33 +00:00
|
|
|
self.scan_contact_code_button = ScanContactCodeButton(self.driver)
|
2018-01-03 09:34:40 +00:00
|
|
|
self.confirm_public_key_button = ConfirmPublicKeyButton(self.driver)
|
|
|
|
|
2018-05-25 17:29:07 +00:00
|
|
|
self.status_test_dapp_button = StatusTestDAppButton(self.driver)
|