Exemplo n.º 1
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
Exemplo n.º 2
0
    def test_index_open_publish(self):
        """
        点击发布,并打开
        :return:
        """
        rlpage = RentListPage(self.driver)
        rlpage.click_dh_publish()

        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
Exemplo n.º 3
0
    def test_common_open_login(self):
        """
        点击登录,并打开
        :return:
        """
        rlpage = RentListPage(self.driver)
        rlpage.click_login()

        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
Exemplo n.º 4
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