Example #1
0
    def test_zc_dh_help_close(self):
        """
        鼠标滑过“帮你租房”
        :return:
        """
        f = False

        rlpage = RentListPage(self.driver)
        rlpage.show_help_rent()

        try:
            assert u"365租房助手" in rlpage.fine_element(rlpage.zc_show_help_pic).text
            print ('Show PIC Test Pass.')
            f = True
        except Exception as e:
            print ('Test Fail.', format(e))
            raise e

        if f == True:
            rlpage.click_help_pic()
            rlpage.switch_widows()  # 切换到新打开的tab,去check打开的页面正确与否
            try:
                assert u"南京出租房" in rlpage.get_page_title()
                print ('Open PIC Test Pass.')
                rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
            except Exception as e:
                print('Test Fail.', format(e))
                rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
                raise e

            rlpage.close_help_pic()
            rlpage.sleep(2)
Example #2
0
    def test_zc_dh_help_rent(self):
        """
        点击左侧“帮你租房”
        :return:
        """
        rlpage = RentListPage(self.driver)
        rlpage.click_help_rent()

        rlpage.switch_widows()  # 切换到新打开的tab,去check打开的页面正确与否
        try:
            assert u"南京出租房" in rlpage.get_page_title()
            print ('Test Pass.')
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
        except Exception as e:
            print('Test Fail.', format(e))
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
            raise e
Example #3
0
    def test_common_open_rent(self):
        """
        点击租房,并打开
        :return:
        """
        rlpage = RentListPage(self.driver)
        rlpage.click_rent()

        rlpage.switch_widows()  # 切换到新打开的tab,去check打开的页面正确与否
        print rlpage.get_page_title()
        try:
            assert u"南京房屋出租信息" in rlpage.get_page_title()
            print ('Test Pass.')
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
        except Exception as e:
            print ('Test Fail.', format(e))
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
            raise e
Example #4
0
    def test_yc_dh_open_feedback(self):
        """
        点击右侧意见反馈iocn,并打开
        :return:
        """
        rlpage = RentListPage(self.driver)
        rlpage.click_yc_dh_feedback()

        rlpage.switch_widows()  # 切换到新打开的tab,去check打开的页面正确与否
        print rlpage.get_page_title()
        try:
            assert u"二手房交易-365淘房华侨路茶坊" in rlpage.get_page_title()
            print ('Test Pass.')
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
        except Exception as e:
            print ('Test Fail.', format(e))
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
            raise e
Example #5
0
    def test_index_open_modify(self):
        """
        点击修改删除房源,并打开
        :return:
        """
        rlpage = RentListPage(self.driver)
        rlpage.click_dh_modify()

        rlpage.switch_widows()  # 切换到新打开的tab,去check打开的页面正确与否
        print rlpage.get_page_title()
        try:
            assert u"南京二手房交易" in rlpage.get_page_title()
            print ('Test Pass.')
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
        except Exception as e:
            print ('Test Fail.', format(e))
            rlpage.switch_widows(isclose=True)  # 切 换回原来的tab, 并关闭原来的tab
            raise e
Example #6
0
    def test_common_open_phone(self):
        """
        点击鼠标滑动悬浮显示联系方式手机淘房,并打开
        :return:
        """
        rlpage = RentListPage(self.driver)
        rlpage.click_app()

        rlpage.switch_widows()  # 切换到新打开的tab,去check打开的页面正确与否
        print rlpage.get_page_title()
        try:
            assert u"365淘房APP官网下载" in rlpage.get_page_title()
            print ('Test Pass.')
            rlpage.switch_widows(isclose=True)  # 切换回原来的tab, 并关闭原来的tab
        except Exception as e:
            print ('Test Fail.', format(e))
            rlpage.switch_widows(isclose=True)  # 切换回原来的tab, 并关闭原来的tab
            raise e