Exemple #1
0
 def setup_class(self):
     # 实例化地址管理页面
     self.address = PageAddress(get_driver())
     # 登录成功
     # 实例化登录页面
     self.login = PageLogin(get_driver())
     self.login.page_login('13331172859','123456')
     # 点击设置
     self.login.page_click_setting()
     # 点击地址管理
     self.address.page_click_address_manage()
Exemple #2
0
 def setup_class(self):
     #实例化 登陆页面类
     self.login=PageIn(get_driver()).page_get_login()
     #点击我
     self.login.page_click_me()
     #点击已有账户去登陆
     self.login.page_click_info()
Exemple #3
0
 def setup_class(self):
     # 获取driver
     self.driver = get_driver()
     # 实例化PageIn
     self.page = PageIn(self.driver)
     # 获取PageSetting实例化对象 为什么要拿到setting对象???
     self.setting = self.page.page_get_page_setting()
 def setup_class(self):
     # 实例化 登录页面类
     self.login = PageLogin(get_driver())
     # 点击我
     self.login.page_click_me()
     # 点击已有账户
     self.login.page_click_info()
Exemple #5
0
 def setup_class(self):
     # self.obj = Login_Page(get_driver())
     # # 点击我的
     # self.obj.click_btn()
     self.page_obj = Page(get_driver())
     #点击我的
     self.page_obj.get_login_page().click_btn()
Exemple #6
0
 def setup_class(self):
     # 初始化driver
     self.driver = get_driver('com.android.settings', '.Settings')
     # 实例化PageIn
     self.pagein = PageIn(self.driver)
     # 获取setting对象
     self.setting = self.pagein.page_get_page_setting()
 def setup_class(self):
     """
     点击我的
     :return:
     """
     self.obj_page = Login_Page(
         get_driver('com.tpshop.malls', '.SPMainActivity'))
     self.obj_page.click_my_btn_page()
Exemple #8
0
 def setup_class(self):
     self.page = PageIn(get_driver())
     self.page.page_get_login().page_login("13805489414", "123456")
     #点击设置
     self.page.page_get_login().page_click_setting()
     #点击地址管理
     self.address = self.page.page_get_setting()
     self.address.page_address_manage()
Exemple #9
0
 def setup_class(self):
     # 实例化 登录页面类
     self.login = PageIn(get_driver()).page_get_login()
     allure.attach("点击我")
     # 点击我
     self.login.page_click_me()
     # 点击已有账号去登录
     allure.attach("点击已有账号去登录")
     self.login.page_click_info()
Exemple #10
0
 def setup_class(self):
     self.Dv = return_page(get_driver())
     # 屏幕向右滑动三次
     for i in range(3):
         self.Dv.return_register_page().right_downward_slide()
     # 点击进入爱优品按钮
     self.Dv.return_register_page().click_access_love_youpin()
     # 点击始终允许按钮
     self.Dv.return_register_page().click_allow_button()
 def setup_class(self):
     # 登录成功
     self.page = PageIn(get_driver())
     self.page.page_get_login().page_login('18610453007', '123456')
     # 点击设置
     self.page.page_get_login().page_click_setting()
     # 实例化 地址管理页面类 PageAddress
     self.address = self.page.page_get_address()
     # 点击 地址管理
     self.address.page_click_address_massage()
Exemple #12
0
 def setup_class(self):
     # 实例化 登录页面类
     self.page = PageIn(get_driver())
     self.page.page_get_login().page_login("zhangsan", "123456")
     # 实例化 PageAddress
     self.address = self.page.page_get_address()
     # 点击设置
     self.address.page_address_btn_image()
     # 点击地址管理
     self.address.page_address_manage()
Exemple #13
0
 def setup_class(self):
     # 获取driver
     self.driver = get_driver()
     # 实例化统一入口类
     self.page = PageIn(self.driver)
     # 实例化登录页面对象
     self.login = self.page.page_get_login()
     # 实例化设置页面对象
     self.setting = self.page.page_get_setting()
     # 点击我的
     self.login.page_click_me()
     # 点击已有账号去登录
     self.login.page_click_login_link()
Exemple #14
0
 def setup_class(self):
     print("获取数据驱动的添加地址格式:", get_data("add"))
     print("获取数据驱动的编辑址格式:", get_data("edit"))
     # 获取driver
     self.driver = get_driver()
     # 获取统一入口类
     self.page = PageIn(self.driver)
     # 获取设置页面对象
     self.setting = self.page.page_get_setting()
     allure.attach("描述", "地址管理前登陆")
     # 登录 +点击设置
     self.page.page_get_login().page_login_address()
     allure.attach("描述", "点击地址管理")
     # 点击地址管理
     self.setting.page_click_address_manage()
 def setup_class(self):
     self.login = PageIn(get_driver()).page_get_login()
     self.login.page_click_me()
     self.login.page_click_info()
Exemple #16
0
 def setup_class(self):
     # 实例化统一入口类
     self.page_obj = Page(get_driver("com.yunmall.lc", "com.yunmall.ymctoc.ui.activity.MainActivity"))
 def setup_class(self):
     self.sp_obj= Set_page(get_driver())
     self.sp_obj.click_more()
     self.sp_obj.click_move_net()
Exemple #18
0
from Base.get_driver import get_driver
from Page.page_login import PageLogin
from Page.page_setting import PageSetting

driver = get_driver()


class PageIn():
    # 获取登录页面对象
    def page_get_login(self):
        return PageLogin(driver)

    # 获取设置页面对象
    def page_get_setting(self):
        return PageSetting(driver)
Exemple #19
0
 def setup_class(self):
     self.page_obj = Page(
         get_driver('com.yunmall.lc',
                    'com.yunmall.ymctoc.ui.activity.MainActivity'))
Exemple #20
0
 def setup_class(self):
     print("arr解析后的数据为:", get_data('sms'))
     self.driver = get_driver("com.android.mms", ".ui.ConversationList")
     self.sms = PageSMS(self.driver)
     # 点击添加短信按钮和输入固定手机号
     self.sms.page_add_sms_and_phone("18666666666")
Exemple #21
0
 def setup_class(self):
     self.Page_obj = Page(get_driver("com.tpshop.malls", ".SPMainActivity"))
     self.Page_obj.get_login_page().click_my_btn()
Exemple #22
0
 def setup_class(self):
     self.pag_obj = Page(get_driver())
     # 判断是否登陆
     self.pag_obj.get_login_page().if_login()
Exemple #23
0
    def setup_class(self):
        self.driver = get_driver("com.android.mms", ".ui.ConversationList")

        self.sms_obj = Sms_Page(self.driver)
Exemple #24
0
 def setup_class(self):
     self.page_obj = Page(get_driver())
     # 点击我的
     self.page_obj.get_login_page().click_my_btn()
Exemple #25
0
 def __init__(self):
     self.driver = get_driver()
import time

from selenium.webdriver.common.by import By

from Base.page import Page
from Base.get_driver import get_driver

# 实例化统一入口类
page_obj = Page(
    get_driver("com.yunmall.lc",
               "com.yunmall.ymctoc.ui.activity.MainActivity"))

# 点击首页我
page_obj.get_home_page().click_home_my_btn()
# 点击已有账户去登录
page_obj.get_sign_page().click_sign_exits_btn()
# 登录操作
page_obj.get_login_page().login("13488834010", "159357li123")


def get_toast(tos):
    # 获取消息
    xpath_data = (By.XPATH, "//*[contains(@text,'%s')]" % tos)

    toast_text = page_obj.get_setting_page().search_element(xpath_data,
                                                            timeout=3,
                                                            poll_frequency=0.5)

    print(toast_text.text)

Exemple #27
0
 def setup(self):
     # 获取driver
     self.driver=get_driver()
     # 实例化setting页面对象
     self.setting = PageSetting(self.driver)
Exemple #28
0
from selenium.webdriver.common.by import By

from Page.page import Page
from Base.get_driver import get_driver

page_obj = Page(
    get_driver('com.yunmall.lc',
               'com.yunmall.ymctoc.ui.activity.MainActivity'))
# 点击我
page_obj.get_homepage().click_my_btn()
# 选择已注册账号
page_obj.get_choice_page().click_login_exist()
# 输入
page_obj.get_login_page().Login_in('18796773314', '1234567')
# msg = (By.XPATH, '//*[contains(@text,"密码错误")]')
# print(page_obj.get_login_page().get_element(msg, timeout=6, poll_frequency=0.5).text)
print(page_obj.get_login_page().get_toast_msg('密码错误'))
# # 个人页面
# page_obj.get_personal_page().get_per_text()
# page_obj.get_personal_page().click_setting()
# # 退出页面
# page_obj.get_setting().click_quit()
Exemple #29
0
 def setup_class(self):
     # 实例化 PageLogin
     self.login = PageLogin(get_driver())
Exemple #30
0
 def setup_class(self):
     self.page_obj = Page(get_driver("com.android.settings", ".Settings"))