Exemplo n.º 1
0
class Test_004_SearchCustomer:
    baseUrl = ReadConfig.getApplicationURL()
    username = ReadConfig.getUsername()
    password = ReadConfig.getPassword()

    logger = LogGen.loggen()

    @pytest.mark.regression
    def test_searchCustomer(self, setup):
        self.driver = setup
        self.driver.get(self.baseUrl)
        self.driver.maximize_window()

        self.lp = Login(self.driver)
        self.lp.setUserName(self.username)
        self.lp.setPassword(self.password)
        self.lp.clickLogin()

        self.addcust = AddCustomers(self.driver)

        self.addcust.clickOnCustomerMenu()
        self.addcust.clickOnCustomerMenuItem()

        searchCust = SearchCustomer(self.driver)
        searchCust.setFirstName("Victoria")
        searchCust.setLastName("Terces")
        searchCust.clickSearch()

        time.sleep(5)

        status = searchCust.searchCustomerByName("Victoria Terces")
        assert True == status
        self.driver.close()
Exemplo n.º 2
0
class Test_Login(unittest.TestCase):
    url = 'https://www.incometaxindiaefiling.gov.in/home'
    phone = ReadConfig.getUserPhone()
    email = ReadConfig.getEmail()
    password = ReadConfig.getPassword()
    min_wait = ReadConfig.add_min_sleep()
    max_wait = ReadConfig.add_max_sleep()
    guid_value = Other_Utilities.generate_random_string()

    def setUp(self):
        Driver.Initialize()

    def tearDown(self):
        Driver.CloseDriver()

    def test_switch_window_and_download_pdf(self):
        download_dir = "C:\\Users"
        options = webdriver.ChromeOptions()
        root_path = Other_Utilities.get_project_root_path()
        print("Root Project path : " + root_path)
        profile = {
            "plugins.plugins_list": [{
                "enabled": False,
                "name": "Chrome PDF Viewer"
            }],
            # Disable Chrome's PDF Viewer
            "download.default_directory":
            download_dir,
            "download.extensions_to_open":
            "applications/pdf",
            "download.prompt_for_download":
            False,  # To auto download the file
            "download.directory_upgrade":
            True,
            "plugins.always_open_pdf_externally":
            True  # It will not show PDF directly in chrome
        }
        options.add_experimental_option("prefs", profile)
        driver = webdriver.Chrome(
            'C:/Personal Doc/Returns Team/Selenium Drivers/chromedriver.exe',
            chrome_options=options
        )  # Optional argument, if not specified will search path.

        print("Downloading PDF")
        get_pdf_url = ""
        driver.get(
            'https://www.incometaxindiaefiling.gov.in/eFiling/Portal/StaticPDF/ITD_CALENDER_2021_final%20JANUARY2.pdf'
        )
        print("Saving  PDF")
        # KeyBoardActions.PressEnter()
        print("Opened new window")
        print("Downloading PDF")
        print("Download Completed")
        print("Reading PDF")
        pdf_path = "C:/Users/bharat.kodalkar/Downloads/ITD_CALENDER_2021_final JANUARY2.pdf"
        # pdfutilities.PDFUtilities.read_pdf_content_of_page(pdf_path,1)
        page_count = pdfutilities.PDFUtilities.get_count_of_pdf_pages(pdf_path)
        print("Page Count is : " + page_count)
Exemplo n.º 3
0
class Test_001_Login:
    # baseUrl = "https://admin-demo.nopcommerce.com/"
    # username = "******"
    # password = "******"

    #Now we getting the hardcoded values using readproperties.py file
    baseUrl = ReadConfig.getApplicationUrl()
    username = ReadConfig.getUsername()
    password = ReadConfig.getPassword()

    logger = LogGen.loggen()

    @pytest.mark.sanity
    @pytest.mark.regression
    def test_homePageTitle(self, setup):
        self.logger.info("***************Test_001_Login***************")
        self.logger.info(
            "***************Verify Home page title***************")
        self.driver = setup
        self.driver.get(self.baseUrl)
        act_Title = self.driver.title

        if act_Title == "Your store. Login":
            assert True
            self.driver.close()
            self.logger.info(
                "***************homePageTitle is passed***************")
        else:
            self.driver.save_screenshot(".\\Screenshots\\" +
                                        "test_homePageTitle.png")
            self.driver.close()
            self.logger.info(
                "***************homePageTitle is Failed***************")
            assert False

    @pytest.mark.sanity
    @pytest.mark.regression
    def test_login(self, setup):
        self.logger.info("***************test_login started***************")
        self.driver = setup
        self.driver.get(self.baseUrl)
        #Create an object to call class of LoginPage from Page Object class
        self.lp = Login(self.driver)
        self.lp.setUserName(self.username)
        self.lp.setPassword(self.password)
        self.lp.clickLogin()
        act_title = self.driver.title

        if act_title == "Dashboard / nopCommerce administration":
            assert True
            self.logger.info(
                "***************test_login started Passed***************")
            self.driver.close()
        else:
            self.driver.save_screenshot(".\\Screenshots\\" + "test_login.png")
            self.driver.close()
            self.logger.info("***************test_login Failed***************")
            assert False
Exemplo n.º 4
0
class Test002ddtlogin:
    baseurl = ReadConfig.readApplicationURL()
    path = ".//TestData/LoginData.xlsx"
    logger = LogGen.loggen()

    def test_login(self):
        self.logger.info(
            "**************************Test_002_Datadriventest_login************************************"
        )
        self.logger.info(
            "**************************verifying Home Page Login***********************************"
        )
        self.driver = webdriver.Chrome("C:\Program Files\chromedriver.exe")
        self.driver.get(self.baseurl)
        self.lp = LogInPage(self.driver)
        self.rows = XLSutilities.getrowcount(self.path, 'sheet1')
        print("number of rows in excel sheet are", self.rows)
        lst_status = []
        for r in range(2, self.rows + 1):
            self.user = XLSutilities.readData(self.path, 'sheet1', r, 1)
            self.pwd = XLSutilities.readData(self.path, 'sheet1', r, 2)
            self.result = XLSutilities.readData(self.path, 'sheet1', r, 3)
            self.lp.setUserName(self.user)
            self.lp.setPassword(self.pwd)
            self.lp.clickLogIn()
            time.sleep(5)
            act_title = self.driver.title
            exp_title = "Dashboard / nopCommerce administration"
            if act_title == exp_title:
                if self.result == "Pass":  #title passed and the uname and pwd are valid test passes
                    self.logger.info("*****test passed")
                    self.lp.clickLogOut()
                    lst_status.append("Pass")
                elif self.result == 'Fail':  # title passed, uname and pwd are invalid test should fail
                    self.logger.info("******failed")
                    self.lp.clickLogOut()
                    lst_status.append("Fail")

            elif act_title != exp_title:
                if self.result == "Pass":  # title not passed,uname and pwd are valid test should fail
                    self.logger.info("****8Failed")
                    lst_status.append("Fail")
                else:
                    self.logger.info("*****Passed")
                    lst_status.append(
                        "Pass"
                    )  # title not passed, invalid data ,test should fail here

        if "Fail" not in lst_status:
            self.logger.info("******Login DDT test passed *****")
            self.driver.close()
            assert True
        else:
            self.logger.info("******* Login DDT test failed")
            self.driver.close()
            assert False
        self.logger.info("******* end of Login test***********")
        self.logger.info("***************completed testcase Login DDT*******")
Exemplo n.º 5
0
class Test_002_Login:
    # baseUrl = "https://admin-demo.nopcommerce.com/"
    # username = "******"
    # password = "******"

#Now we getting the hardcoded values using readproperties.py file
    baseUrl = ReadConfig.getApplicationUrl()
    path = ".//TestData/LoginData.xlsx"
    # username = ReadConfig.getUsername() #No need because it will came from excel
    # password = ReadConfig.getPassword() #No need because it will came from excel

    logger = LogGen.loggen()



    def test_login_ddt(self,setup):
        self.logger.info("***************test_login started DDT test***************")
        self.logger.info("***************test_login started***************")
        self.driver = setup
        self.driver.get(self.baseUrl)
        #Create an object to call class of LoginPage from Page Object class
        self.lp = Login(self.driver)

        #excel utils code

        self.rows = XLUtils.getRowCount(self.path, 'Sheet1')
        print("No of rows in excel", self.rows)

        lst_status = [] #Empty List variable we need to create
        for r in range(2, self.rows+1):
            self.user = XLUtils.readData(self.path, 'Sheet1', r,1)
            self.password = XLUtils.readData(self.path, 'Sheet1', r,2)
            self.exp = XLUtils.readData(self.path, 'Sheet1', r,3)

            self.lp.setUserName(self.user)
            self.lp.setPassword(self.password)
            self.lp.clickLogin()
            time.sleep(5)

            act_title = self.driver.title
            exp_title = "Dashboard / nopCommerce administration"


            if act_title == exp_title:
                if self.exp == "Pass":
                    self.logger.info("**********DDT Test is Passed**********")
                    self.lp.clickLogout()

                    lst_status.append("Pass")
                    time.sleep(5)

                elif self.exp == "Fail":
                    self.logger.info("**********DDT Test Case Failed**********")
                    lst_status.append("Fail")
                    self.driver.close()
                    time.sleep(5)
Exemplo n.º 6
0
class Test_002_DDT_Login:
    baseUrl = ReadConfig.getApplicationURL()
    path = ".//TestData/LoginData.xlsx"

    logger = LogGen.loggen()

    @pytest.mark.regression
    def test_login_ddt(self, setup):
        self.driver = setup
        self.driver.get(self.baseUrl)
        self.driver.maximize_window()
        self.lp = Login(self.driver)

        self.rows = XLUtils.getRowCount(self.path, 'Sheet1')

        print('No: of rows: ', self.rows)

        lst_status = []
        for r in range(2, self.rows + 1):
            self.user = XLUtils.getReadData(self.path, 'Sheet1', r, 1)
            self.password = XLUtils.getReadData(self.path, 'Sheet1', r, 2)
            self.exp = XLUtils.getReadData(self.path, 'Sheet1', r, 3)
            time.sleep(3)
            self.lp.setUserName(self.user)
            self.lp.setPassword(self.password)
            self.lp.clickLogin()
            time.sleep(5)

            act_title = self.driver.title
            exp_title = 'Dashboard / nopCommerce administration'

            if act_title == exp_title:
                if self.exp == 'Pass':
                    self.lp.clickLogout()
                    lst_status.append('Pass')

                elif self.exp == 'Fail':
                    self.lp.clickLogout()
                    lst_status.append('Fail')

            elif act_title != exp_title:
                if self.exp == 'Pass':
                    self.lp.clickLogout()
                    lst_status.append('Fail')

                elif self.exp == 'Fail':
                    self.lp.clickLogout()
                    lst_status.append('Pass')

        if 'Fail' not in lst_status:
            self.driver.close()

            assert True
        else:
            self.driver.close()
            assert False
class Test_003_LoginCustomers:
    URLADMIN = ReadConfig.getapplicationURL1()
    logger = LogGen.loggen()

    @pytest.mark.sanity
    def test_LoginCustomers(self, setup):
        self.logger.info("*****Test_003_login*****")
        self.logger.info("*****LoginCustomers*****")
        self.driver = setup
        self.driver.get(self.URLADMIN)
class Test_search_CustomerByEmail_004():
    baseUrl = ReadConfig.getApplicationUrl()
    username = ReadConfig.getUsername()
    password = ReadConfig.getPassword()
    logger = LogGen.loggen()

    def test_searchCustomerByEmail(self, setup):
        self.logger.info("**********search customer by email 004*************")
        self.driver = setup
        self.driver.get(self.baseUrl)
        self.driver.maximize_window()

        self.lp = Login(self.driver)
        self.lp.setUserName(self.username)
        self.lp.setPassword(self.password)
        self.lp.clickLogin()
        self.logger.info("***********Login successfull***********")

        # self.logger("***********starting search customer by email************")

        self.addCustomer = AddCustomer(self.driver)

        self.addCustomer.click_On_Customer_Menu()
        self.addCustomer.click_On_Customer_Menu_item()



        self.logger.info("*********search by email id***********")

        sercCustomer = searchCustomer(self.driver)
        sercCustomer.setEmail("*****@*****.**")
        sercCustomer.submitClick()
        time.sleep(5)

        status = sercCustomer.searchCustomerByEmail("*****@*****.**")
        assert True == status
        self.logger.info("*********TC SEARCH CUSTOMER BY EMAIL finished.......")
class Test_searchCustomerEmail004:
    baseURL = ReadConfig.readApplicationURL()
    username = ReadConfig.getUseremail()
    password = ReadConfig.getPassword()
    logger = LogGen.loggen()

    def test_searchCustomerByEmail(self):

        self.logger.info(
            "*********** search customer test 004 started***************")
        self.logger.info(
            "*********** logging with username and password******")
        self.driver = webdriver.Chrome("C:\Program Files\chromedriver.exe")
        self.driver.get(self.baseURL)
        self.driver.maximize_window()
        self.lp = LogInPage(self.driver)
        self.lp.setUserName(self.username)
        self.lp.setPassword(self.password)
        self.lp.clickLogIn()
        self.logger.info("**********user logged in to website successfully")

        self.logger.info("*********** search customer by mail or name started")
        self.addcust = AddCustomer(self.driver)
        self.addcust.clickOnCustomerMenu()
        self.addcust.clickOnCustomerMenuItem()

        self.logger.info("********** serach customer by email")
        searchcust = SearchCustomer(self.driver)
        searchcust.setEmail("*****@*****.**")
        searchcust.clickonSearch()
        time.sleep(5)
        status = searchcust.searchCustomerByEmail(
            "*****@*****.**")
        assert True == status
        self.logger.info(
            "************ test search customer by email finished********")
        self.driver.close()
Exemplo n.º 10
0
class Test_001_login:
    URL = ReadConfig.getapplicationURL()
    username = ReadConfig.username()
    password = ReadConfig.password()
    logger = LogGen.loggen()

    @pytest.mark.sanity
    @pytest.mark.regression
    def testhomepage(self, setup):
        self.logger.info("*****Test_001_login*****")
        self.logger.info("*****Verifying Home page title*****")
        self.driver = setup
        self.driver.get(self.URL)
        act_title = self.driver.title
        if act_title == "nopCommerce demo store":
            assert True
            self.logger.info("*****Test Case passed*****")
        else:
            self.logger.info("*****Test Case Failed****")
        self.lp = login(self.driver)
        self.lp.clickLogin()
        self.lp.username(self.username)
        print()
        self.lp.password(self.password)
        self.driver.save_screenshot(
            "C:\\Users\\Priyabrata Debolina\\PycharmProjects\\Selenium with python\\Screenshots\\testhomepage.png"
        )
        self.driver.close()

    @pytest.mark.regression
    def testregister(self, setup):
        self.driver = setup
        self.driver.get(self.URL)
        self.driver.maximize_window()
        self.driver.find_element_by_class_name('ico-register').click()
        self.driver.close()
class Test_002_login_DDT:
    URL = ReadConfig.getapplicationURL()
    path=r"C:\\Users\\Priyabrata Debolina\\PycharmProjects\\Selenium with python\\TestData\practice.xlsx"
    logger=LogGen.loggen()
    @pytest.mark.regression
    def test_ddt(self,setup):
        self.logger.info("*****Test_002_login*****")
        self.logger.info("*****Verifying Login DDT test*****")
        self.driver=setup
        self.driver.get(self.URL)

        self.lp=login(self.driver)
        self.lp.clickLogin()
        self.rows=XLUtils.getRowcount(self.path,'Sheet1')

        for r in range(2,self.rows+1):
            self.user=XLUtils.readData(self.path,'Sheet1',r,1)
            self.pwd=XLUtils.readData(self.path,'Sheet1',r,2)
            self.driver.save_screenshot('C:\\Users\\Priyabrata Debolina\\PycharmProjects\\Selenium with python\\Screenshots\\test_DDT.png')


        self.lp.username(self.user)
        self.lp.password(self.pwd)
Exemplo n.º 12
0
class Test003Addcustomer:
    baseURL = ReadConfig.readApplicationURL()
    username = ReadConfig.getUseremail()
    password = ReadConfig.getPassword()
    logger = LogGen.loggen()  # create logger object

    def test_addCustomer(self):
        self.logger.info(
            "**************test003  add customer  Login started*****")
        self.driver = webdriver.Chrome("C:\Program Files\chromedriver.exe")
        self.driver.get(self.baseURL)
        self.driver.maximize_window()
        # login data is passed using the login page class object lp
        self.lp = LogInPage(self.driver)
        self.lp.setUserName(self.username)
        self.lp.setPassword(self.password)
        self.lp.clickLogIn()
        self.logger.info("************test 003: login successfull************")
        self.logger.info(
            "******** Now adding new customer test started ***************")
        # adding customer information after the successful login
        self.addcust = AddCustomer(self.driver)
        self.addcust.clickOnCustomerMenu()
        self.addcust.clickOnCustomerMenuItem()
        self.addcust.addNew()
        self.logger.info("****** adding customer details*************")

        # generate a random gmail for each customer
        # 8 character string  in lowercase with digits
        def random_generator(size=8,
                             chars=string.ascii_lowercase + string.digits):
            # loop to generate each random character for gmail
            return ''.join(random.choice(chars) for x in range(size))

        self.email = random_generator()
        self.addcust.setCustomerEmail(self.email)
        self.addcust.setpassword("test123")
        self.addcust.setGender("Female")
        self.addcust.setFirstName("Maddie")
        self.addcust.setLastName("Gandra")
        self.addcust.setDob("07/01/1979")
        self.addcust.setCompanyname("AutomationQA")
        self.addcust.setNewsLetter("My NOP commerce project")
        self.addcust.setAdminContent(" This is for testing")
        self.addcust.setCustomerRoles("Administrators")
        self.addcust.setManagerOfVendor("1")
        self.addcust.clickSave()

        self.logger.info(
            "************ saving customer information*****************")

        self.logger.info(
            "************* add customer validation started********")
        # a message about the customer added successfully is displayed on the body of page.so capture it
        self.msg = self.driver.find_element_by_tag_name("body").text
        print(self.msg)
        if 'customer has been added successfully.' in self.msg:
            assert True == True
            self.logger.info("********** Add customer test passed************")
        else:
            self.driver.save_screenshot(".\\Screenshots\\" +
                                        "test_addcustomer_scrnshot.png")
            self.logger.error(
                "*************** add customer  Test Failed *************")
            assert True == False
        self.driver.close()
        self.logger.info(
            " ******** Ending test003 Add customer test **************")
Exemplo n.º 13
0
class Test_Login(unittest.TestCase):
    url = ReadConfig.getApplicationURL()
    phone = ReadConfig.getUserPhone()
    email = ReadConfig.getEmail()
    password = ReadConfig.getPassword()
    min_wait = ReadConfig.add_min_sleep()
    max_wait = ReadConfig.add_max_sleep()
    guid_value = Other_Utilities.generate_random_string()

    def setUp(self):
        Driver.Initialize()

    def tearDown(self):
        Driver.CloseDriver()

    def test_verify_Amazon_homepage(self):
        # >>>>>>>>>>>>>>>>Object Creation<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        __obj_create_account = CreateAmazonAccount()

        # >>>>>>>>>>>>>>>>Test Execution<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        try:
            BaseTest.go_to_url(self.url)
            BaseTest.maximize_window_size()
            BaseTest.IsCorrectPageStatusCode("https://avatax.qa.avalara.io/")
            BaseTest.refresh_browser()
            time.sleep(5)
            __obj_create_account.verify_amazon_logo_image()
        except Exception as ex:
            raise Exception("....Element Not found....." + ex)

    def test_amazon_create_account_successful(self):
        # >>>>>>>>>>>>>>>>Object Creation<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        __obj_create_account = CreateAmazonAccount()

        # >>>>>>>>>>>>>>>>Test Execution<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        try:
            BaseTest.go_to_url(self.url)
            BaseTest.maximize_window_size()
            BaseTest.IsPageURLCorrect(self.url)
            __obj_create_account.verify_amazon_logo_image()
            __obj_create_account.select_sign_in_link()
            __obj_create_account.select_create_account_button()
            __obj_create_account.set_your_name("Test_" + self.guid_value)
            __obj_create_account.set_phone(self.phone)
            format_email=self.guid_value+"@gmail.com"
            __obj_create_account.set_email(format_email)
            __obj_create_account.set_password(self.password + self.guid_value)
            # __obj_create_account.re_enter_password(self.password + self.guid_value)
            __obj_create_account.select_continue_button()
            # __obj_create_account.select_create_account_submit_button()

        except Exception as ex:
            print("Test Failed : "+ex)

    def test_page_http_Status_code(self):
        # >>>>>>>>>>>>>>>>Object Creation<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        __obj_create_account = CreateAmazonAccount()
        url="https://stackoverflow.com"
        # >>>>>>>>>>>>>>>>Test Execution<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        try:
            BaseTest.go_to_url(url)
            BaseTest.maximize_window_size()
            status_code=BaseTest.check_http_status_code_page(url)
            print(status_code)  # 200

        except Exception as ex:
            print("Test Failed : "+ex)
Exemplo n.º 14
0
class Test001login:
    baseurl = ReadConfig.readApplicationURL()
    username = ReadConfig.getUseremail()
    password = ReadConfig.getPassword()

    logger = LogGen.loggen()

    def test_homePageTitle(self):
        self.logger.info(
            "**************************Test_001_login************************************"
        )
        self.logger.info(
            "**************************verifying Home Page Title***********************************"
        )
        self.driver = webdriver.Chrome("C:\Program Files\chromedriver.exe")
        self.driver.get(self.baseurl)
        actual_title = self.driver.title
        self.driver.close()
        if actual_title == "Your store. Login":
            self.logger.info(
                "************************Home page verification test Passed***************************"
            )
            assert True
        else:
            self.driver.save_screenshot(
                "C:\\Users\\gandra\\PycharmProjects\\NOPCommerceApp\Screenshots\\"
                + "test_homePageTitle.png")
            self.driver.close()
            self.logger.error(
                "************************Home page verification test Failed***************************"
            )

            assert False

    def test_login(self):
        self.logger.info(
            "**************************Test_001_login************************************"
        )
        self.logger.info(
            "**************************verifying Home Page Login***********************************"
        )
        self.driver = webdriver.Chrome("C:\Program Files\chromedriver.exe")
        self.driver.get(self.baseurl)
        self.lp = LogInPage(self.driver)
        self.lp.setUserName(self.username)
        self.lp.setPassword(self.password)
        self.lp.clickLogIn()
        title = self.driver.title
        self.lp.clickLogOut()
        self.driver.close()
        if title == "Dashboard / nopCommerce administration":
            self.logger.info(
                "************************Home page Login test Passed***************************"
            )
            assert True
        else:
            self.logger.error(
                "************************Home page Login test Failed***************************"
            )
            self.driver.save_screenshot(
                "C:\\Users\\gandra\\PycharmProjects\\NOPCommerceApp\\Screenshots\\"
                + "test_login.png")
            self.driver.close()
            assert False
Exemplo n.º 15
0
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException, NoSuchElementException, InvalidSelectorException, \
    TimeoutException
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait

from utilities.readproperties import ReadConfig
from utilities.seleniumuiactions import SeleniumUIAction

max_wait = ReadConfig.add_max_sleep()

Instance = None


def Initialize():
    global Instance
    Instance = webdriver.Chrome(
        "C:/Personal Doc/Returns Team/Selenium Drivers/chromedriver.exe")
    Instance.implicitly_wait(5)
    return Instance


def Initialize_Headless():
    global Instance
    from selenium.webdriver.chrome.options import Options

    options = Options()
    options.add_argument('--headless')
    options.add_argument('--disable-gpu')  # Last I checked this was necessary.
    Instance = webdriver.Chrome(
        "C:/Personal Doc/Returns Team/Selenium Drivers/chromedriver.exe",
Exemplo n.º 16
0
class Test_003_AddCustomer:
    baseUrl = ReadConfig.getApplicationUrl()
    username = ReadConfig.getUsername()
    password = ReadConfig.getPassword()
    logger = LogGen.loggen()

    def test_AddCustomer(self, setup):
        self.logger.info("************Test_003_Add_customer")
        self.driver = setup
        self.driver.get(self.baseUrl)
        self.driver.maximize_window()

        self.lp = Login(self.driver)
        self.lp.setUserName(self.username)
        self.lp.setPassword(self.password)
        self.lp.clickLogin()
        self.logger.info("**********Login Successfull*********")

        self.logger.info("**********Starting add Customer List********")
        self.addCustomer = AddCustomer(self.driver)

        self.addCustomer.click_On_Customer_Menu()
        self.addCustomer.click_On_Customer_Menu_item()

        self.addCustomer.click_add_new()

        self.logger.info("*****Add Customer Info *******")
        # self.email = random_generator() + "@gmail.com"
        self.addCustomer.set_email("*****@*****.**")
        self.addCustomer.set_password("test123")
        # self.addCustomer.set_customer_role("Guests")
        self.addCustomer.setManageVendor("Vendor 2")
        self.addCustomer.setGender("Male")
        self.addCustomer.set_first_name("Neil")
        self.addCustomer.set_last_name("Banchanan")
        self.addCustomer.set_dob("9/7/2020")
        self.addCustomer.set_company_name("Developer")
        self.addCustomer.set_admin_content("Testing Automation....")
        self.addCustomer.click_Save()

        self.logger.info("********saving customer info*********")

        self.logger.info("********adding validation*********")

        self.msg = self.driver.find_element_by_tag_name("body").text

        print(self.msg)

        if 'customer has been added successfully' in self.msg:
            assert True == True
            self.logger.info(
                "******Add Customer test has been Passed**********")

        else:
            self.driver.save_screenshot(".\\Screenshots" +
                                        "test_customer_scr.png")
            self.logger.info(
                "******Add Customer test has been Failed**********")
            assert True == False

        self.driver.close()
        self.logger.info("********Ending Test Case Title Test*********")