コード例 #1
0
 def test_03_256_InputChinese_SearchInList(self):
     """结果页添加地标位置推荐正常"""
     self.find_element_id_and_click_wait(
         self.ele.SY_search_widget_btn_search)
     toolUnits.wait(self.driver, self.ele.JGY_tv_search_list_item_title, 5)
     self.find_element_id_and_click_wait(
         self.ele.JGY_tv_result_page_input_box)
     localName = "天通苑"
     self.find_element_id_and_send_keys(self.ele.SS_et_search_input,
                                        localName)
     self.find_element_id_and_click_wait(self.ele.SS_pop_fxs_title)
     # self.find_element_text_and_click_wait('推荐排序')
     self.find_element_id_and_click_wait(
         self.ele.JGY_rl_indicator_check_time, -1)
     self.find_element_id_and_click_wait(
         self.ele.JGY_search_filter_orderBy_distance_tv)
     toolUnits.wait(self.driver,
                    self.ele.JGY_tv_search_list_item_title,
                    timeouts=3)
     houseName = self.get_text(self.ele.JGY_tv_search_list_item_title)
     # self.assertIn(localName, houseName, '输入地标位置搜索结果失败')
     self.find_element_id_and_click_wait(
         self.ele.JGY_iv_result_page_clear_input)
     self.assertIsNot(houseName,
                      self.get_text(self.ele.JGY_tv_search_list_item_title))
     self.backlast(1)
コード例 #2
0
 def test_06_498_060170_TenantBookPage_JumpToWaitToConfirmPage(self):
     """下订单成功跳转至待确定页面"""
     bookUnits.member_pop(self)
     toolUnits.wait(self.driver, self.ele.YD_tv_luBooking_luTitle)
     bookUnits.select_parent(self)
     bookUnits.submit_order(self)
     bookUnits.submit_pop(self)
     toolUnits.wait(self.driver, self.ele.YD_WebView_TitleBar_Title, 4)
     self.assertEqual(self.get_text(self.ele.YD_WebView_TitleBar_Title),
                      '等待房东确认', '提交订单失败')
コード例 #3
0
 def test_01_start_app_00001(self):
     """点击APP跳过按钮"""
     toolUnits.wait(self.driver, self.ele.QD_splashActivity_passBtn)
     sleep(1)
     for i in range(3):
         self.swipeLeft(t=2)
         sleep(1)
     self.assertTrue(
         self.hasElement(self.ele.QD_splashActivity_startUseBtn),
         "没有滑动至启动页最后一页")
     self.swipeRight(t=2)
コード例 #4
0
 def test_03_109_030017_enter_lodge_unit_detail(self):
     """进入房源详情页"""
     self.find_element_id_and_click_wait(
         self.ele.SY_search_widget_btn_search)
     toolUnits.wait(self.driver, self.ele.JGY_tv_search_list_item_title, 5)
     house_name = self.get_text(self.ele.JGY_tv_search_list_item_title)
     self.find_element_id_and_click_wait(self.ele.JGY_iv_loop_image_item)
     self.assertEqual(house_name,
                      self.get_text(self.ele.XQY_tv_lodge_detail_unit_name),
                      '进入详情页失败')
     self.backlast(2)
コード例 #5
0
def input_tenant_im_detail(driver, IMName='房间标题整体出租'):
    """进入IM详情页"""
    driver.find_element_class_name_and_click(IMName)
    if driver.hasElement(driver.ele.RL_select_day_clearBtn):
        today, newDay = toolUnits.calendar(2)
        driver.find_element_desc_click_wait(today)
        driver.find_element_desc_click_wait(newDay)
        driver.find_element_id_and_click_wait(
            driver.ele.RL_search_filter_more_confirm_button)
        toolUnits.wait(driver.driver, driver.ele.FKIM_ed_input)
    driver.assertEqual(driver.ele.FKIM_TenantChatMessageActivity,
                       driver.driver.current_activity, '进入IM详情页失败')
コード例 #6
0
 def test_03_272_030174_SearchInMap(self):
     """切换至地图页面操作"""
     self.find_element_id_and_click_wait(
         self.ele.SY_search_widget_btn_search)
     toolUnits.wait(self.driver, self.ele.JGY_iv_result_page_mod_switch, 5)
     self.find_element_id_and_click_wait(
         self.ele.JGY_iv_result_page_mod_switch)
     self.find_element_id_and_click_wait(
         self.ele.JGY_tv_result_page_input_box)
     localName = "天通苑"
     self.find_element_id_and_send_keys(self.ele.SS_et_search_input,
                                        localName)
     self.find_element_id_and_click_wait(self.ele.SS_pop_fxs_title,
                                         timeout=3)
     print(self.get_text(self.ele.JGY_map_address_background))
     self.assertEqual(localName,
                      self.get_text(self.ele.JGY_map_address_background),
                      '地图页输入地标搜索失败')
     self.backlast(1)
コード例 #7
0
ファイル: lock_units.py プロジェクト: moulage/appium-android
def input_lock_management(driver, back=True):
    """
    进入门锁管理页面
    :param driver:
    :param back: 是否返回上一级页面
    :return:
    """
    if driver.get_text(driver.ele.MS_lock_manage_group_title) == '- 使用中的门锁 -':
        driver.find_element_id_and_click_wait(
            driver.ele.MS_lock_manage_using_lockName)
        toolUnits.wait(driver.driver, driver.ele.actionbarwidget_back, 3)
        driver.assertEqual(driver.ele.MS_Lock_PrivilegeManageActivity,
                           driver.driver.current_activity, '进入开门权限设置页面失败')
        if back:
            driver.backlast(1)
            driver.assertEqual(driver.ele.MS_Lock_ManageActivity,
                               driver.driver.current_activity, '门锁管理页面返回列表失败')
            driver.find_element_id_and_click_wait(
                driver.ele.MS_lock_manager_passBtn)
コード例 #8
0
 def test_07_ToRentCalendarPageAndChangeState_8888(self):
     """修改日历状态"""
     self.find_element_class_name_and_click('出租日历')
     self.swipeDown(0.5, 0.6, 0.4)
     today = toolUnits.calendar()
     self.find_element_desc_click_wait(today)
     self.find_element_class_name_and_click('修改房态')
     sleep(1)
     self.find_element_id_and_click_wait(self.ele.FBXT_tv_hire_no)
     toolUnits.wait(self.driver, self.ele.FBXT_tv_landlord_calendar_price)
     self.assertNotIn(
         "¥", self.get_text(self.ele.FBXT_tv_landlord_calendar_price),
         '修改关闭日历房态失败')
     self.find_element_desc_click_wait(today)
     self.find_element_class_name_and_click('修改房态')
     sleep(1)
     self.find_element_id_and_click_wait(self.ele.FBXT_tv_hire_yes)
     self.assertIn("¥",
                   self.get_text(self.ele.FBXT_tv_landlord_calendar_price),
                   '修改打开日历房态失败')
コード例 #9
0
ファイル: bookUnits.py プロジェクト: moulage/appium-android
def cancelOrder(driver):
    """取消订单"""
    for i in range(10):
        driver.backlast()
        if driver.hasElement(driver.ele.SY_HomepageNavTab):
            break
    driver.find_element_id_and_click_wait(driver.ele.SY_HomepageNavTab, 3)
    driver.find_element_id_and_equal_text_click(
        driver.ele.FKZX_tv_myself_normal_item_title, '全部订单')
    if driver.hasElement(driver.ele.FKDD_tv_first):
        driver.backlast(1)
        return
    toolUnits.wait(driver.driver, driver.ele.FKDD_tv_tenantOrderListItem_state,
                   5)
    driver.find_element_id_and_equal_text_click(driver.ele.FKDD_button_text,
                                                '操作订单')
    driver.find_element_id_and_equal_text_click(driver.ele.FKDD_button_text,
                                                '取消订单')
    driver.find_element_id_and_click_wait(
        driver.ele.QQDD_order_cancel_reason_isSelected)
    driver.find_element_id_and_click_wait(
        driver.ele.QQDD_advance_check_out_next)
    toolUnits.wait(driver.driver, driver.ele.FKDD_tv_orderListTab_title, 5)
    driver.backlast(1)
コード例 #10
0
 def test_02_79_020002_home_page_choose_domestic_hot_city_8888(self):
     """测试选择国内热门城市"""
     self.assertEqual(self.ele.SY_HomepageActivity, self.driver.current_activity, '进入首页失败')
     self.find_element_id_and_click_wait(self.ele.SY_search_widget_tv_city)
     toolUnits.wait(self.driver, self.ele.SS_rl_search_input_box_wrap)
     origin_text = self.get_text(self.ele.SS_wg_gv_itemtv, 2)
     self.find_element_id_and_click_wait(self.ele.SS_wg_gv_itemtv, 2)
     toolUnits.wait(self.driver, self.ele.SY_HomepageNavTab)
     self.find_element_id_and_click_wait(self.ele.SY_search_widget_tv_time)
     toolUnits.wait(self.driver, self.ele.RL_select_day_clearBtn)
     self.swipeDown(0.5, 0.5, 0.3)
     self.find_element_id_and_click_wait(self.ele.RL_select_day_clearBtn)
     today, newDay = toolUnits.calendar(2)
     self.find_element_desc_click_wait(today)
     self.find_element_desc_click_wait(newDay)
     self.find_element_id_and_click_wait(self.ele.RL_search_filter_more_confirm_button)
     toolUnits.wait(self.driver, self.ele.SY_HomepageNavTab)
     self.find_element_id_and_click_wait(self.ele.SY_search_widget_btn_search)
     self.assertEqual(self.ele.JGY_SearchResulitActivity, self.driver.current_activity, '进入结果页失败')
     address = self.get_text(self.ele.JGY_tv_result_page_city)
     self.assertEqual(origin_text, address, '城市跳转错误')
     self.assertIsNotNone(self.ele.JGY_iv_search_list_item_fav, '结果页没有加载出来房源信息')
     self.backlast()
コード例 #11
0
def input_landlard_im_detail(driver, tenantName='小猪玩起来'):
    """进入IM详情页"""
    driver.find_element_class_name_and_click(tenantName)
    toolUnits.wait(driver.driver, driver.ele.FKIM_ed_input)
    driver.assertEqual(driver.ele.FDIM_LandLordChatMessageActivityy,
                       driver.driver.current_activity, '进入IM详情页失败')