示例#1
0
    def test_logout(self):

        try:
            driver = self.driver
            home=HomePage(driver)
            home.click_profile()
            time.sleep(8)
            home.click_logout()
            #driver.find_element_by_id("profilePopover").click()
            #driver.find_element_by_xpath("//ul[@class='dropdown-menu profile-tab']/li[4]/strong/a[text()='Logoff']").click()
            time.sleep(5)
            x=driver.title
            assert x=="LHH NGen"

        except AssertionError as error1:
            print("unwanted error")
            print (error1)
            allure.attach(self.driver.get_screenshot_as_png(),name="screen_1", attachment_type=allure.attachment_type.JPG)
            raise