# 添加成员页面，点击手动输入添加
from appium.webdriver.common.mobileby import MobileBy

from homework_zfh.test_appium.page.BasePage import BasePage


class MemberInvitePage(BasePage):

    def addconect_menual(self):
        from homework_zfh.test_appium.page.contactedit_Page import ContactEditPage
        # 点击手动输入添加
        self.find((MobileBy.XPATH, "//*[@text='手动输入添加']")).click()
        # 进入到添加成员编辑页面
        return ContactEditPage(self.driver)

    def get_toast(self):
        # 保存后，获取添加成功的toast
        ele = self.find((MobileBy.XPATH, '//*[@class="android.widget.Toast"]')).text
        return ele
