def test_logout(self):
        try:
            driver = self.driver
            homepage = Homepage(driver)
            homepage.click_welcome()
            homepage.click_Logout()
            x = driver.title
            assert x == "ORANGEeHRM"

        except AssertionError as error:
            print("Assertion error occurred")
            print(error)
            currTime = moment.now().strftime("%d-%m-%Y_%H-%M-%S")
            testName = utils.whoami()
            screenshotName = testName + "_" + currTime
            allure.attach(self.driver.get_screenshot_as_png(),
                          name=screenshotName,
                          attachment_type=allure.attachment_type.PNG)
            driver.get_screenshot_as_file(
                "C:/Users/manikandan/PycharmProjects/AutomationFramework_1/screenshots/"
                + screenshotName + ".png")

            raise

        except:
            print("There was an exception")
            currTime = moment.now().strftime("%d-%m-%Y_%H-%M-%S")
            testName = utils.whoami()
            screenshotName = testName + "_" + currTime
            allure.attach(self.driver.get_screenshot_as_png(),
                          name=screenshotName,
                          attachment_type=allure.attachment_type.PNG)
            driver.get_screenshot_as_file(
                "C:/Users/manikandan/PycharmProjects/AutomationFramework_1/screenshots/"
                + screenshotName + ".png")

            raise

        else:
            print("No exceptions occurred")

        finally:
            print("This block will always execute and Close DB")
    def test_logout(self):
        try:
            driver = self.driver
            home = Homepage(driver)
            home.click_welcome()
            home.click_logout()
            x = driver.title
            assert x == "OrangeHRM"

        except AssertionError as Error:
            print("Assertion Error Occured")
            currTime = moment.now().strftime("%d-%m-%Y_%H-%M-%S")
            testName = util.whoami()
            screenshotName = testName + "_" + currTime
            allure.attach(self.driver.get_screenshot_as_png(),
                          name=screenshotName,
                          attachment_type=allure.attachment_type.PNG)
            driver.get_screenshot_as_file(
                "C:/Users/vijayago/PycharmProjects/Automation_Framework1/screenshots/"
                + screenshotName + ".png")
            print(Error)
            raise

        except:
            print("There was an exception")
            currTime = moment.now().strftime("%d-%m-%Y_%H-%M-%S")
            testName = util.whoami()
            screenshotName = testName + "_" + currTime
            allure.attach(self.driver.get_screenshot_as_png(),
                          name=screenshotName,
                          attachment_type=allure.attachment_type.PNG)
            driver.get_screenshot_as_file(
                "C:/Users/vijayago/PycharmProjects/Automation_Framework1/screenshots/"
                + screenshotName + ".png")

        else:
            print("There was no Error")

        finally:
            print("Final block executed")
        def test_logout(self,test_setup):
        try:
            home_obj = Homepage(driver)
            home_obj.click_welcome()
            home_obj.click_logout()
            x= driver.title
            assert x== "OrangeHRM"

        except AssertionError as error:
            print("Assertionerror")
            print(error)
            raise

        except:
            print("there is an exception")
            raise

        else:
            print("No Exception occured")

        finally:
            print("Test Completed")