コード例 #1
0
def setup():
    path = DirectoryPath()
    options = webdriver.ChromeOptions()
    prefs = {'download.default_directory': path.get_download_dir()}
    options.add_experimental_option('prefs', prefs)
    # options.add_argument('--headless')
    driver = webdriver.Chrome(options=options,
                              executable_path=path.get_driver_path())
    driver.implicitly_wait(30)
    return driver
コード例 #2
0
    def check_variance_chart(self):
        self.files = DirectoryPath()
        self.login_page = ceo_page(self.driver)
        self.driver.find_element_by_id(self.login_page.forcasted_onDate).clear()
        time.sleep(2)
        startDate = self.driver.find_element_by_id(self.login_page.forcasted_onDate)
        startDate.send_keys('10/01/2021')
        time.sleep(2)
        self.driver.find_element_by_id(self.login_page.forecastedendDate).clear()
        time.sleep(2)
        endDate = self.driver.find_element_by_id(self.login_page.forecastedendDate)
        endDate.send_keys('20/01/2021')
        time.sleep(2)
        self.driver.find_element_by_id(self.login_page.forecastedSubmitBtn).click()
        time.sleep(3)
        self.driver.find_element_by_id(self.login_page.varianceDownloadBtn).click()
        time.sleep(3)
        self.filename = self.files.get_download_dir() + '/' + self.login_page.gvpalli_variance
        print(self.filename)
        if os.path.isfile(self.filename) != True:
            print('Windfarm variance csv file is not download')
            self.driver.close()
        else:
            with open(self.filename) as fin:
                csv_reader = csv.reader(fin, delimiter=',')
                header = next(csv_reader)
                act_generation = 0
                forcasted = 0
                for row in csv.reader(fin):
                    print('\n', row)
                    act_generation += float(row[2])
                    forcasted += float(row[1])

                actual = (self.driver.find_element_by_id(self.login_page.tur_actualPowerGen).text).replace('KWh', '')
                forcast = (self.driver.find_element_by_id(self.login_page.tur_forecastPowerGen).text).replace('KWh', '')

                generated = float(re.sub('\f', "", actual).strip())
                forcasting = float(re.sub('\f', "", forcast).strip())

                generated = round(generated,2)
                forcasting =  round(forcasting,2)

                act_generation = round(act_generation,2)
                forcasted = round(forcasted,2)
                os.remove(self.filename)
                print(generated, ":", type(generated), act_generation, ":", type(act_generation), forcasting, ":",
                      type(forcasting), forcasted, ":", type(forcasted))

                if str(act_generation) != str(generated):
                    print('Difference found at actual generation ', act_generation, generated)
                if str(forcasted) != str(forcasting):
                    print('Difference found at actual forcasted ', forcasted, forcasting)
                self.driver.close()
            self.driver.close()
コード例 #3
0
    def test_manager_dashboard(self, setup):
        self.driver = setup
        self.driver.get(self.baseURL)
        self.manager_dashboard = ManagerLogin(self.driver)
        self.manager_dashboard.setUserName(ReadConfig.getmanager_username())
        self.manager_dashboard.setPassword(ReadConfig.getmanager_password())
        self.manager_dashboard.clickLogin()

        if self.manager_dashboard.getuserdisplay() == "Gvpalli Wind Farm":
            assert True
            self.logger.info(
                "********************Test manager Login With Valid Username And Password successfully login********************************")

        else:
            self.driver.save_screenshot(
                "../Screenshots/" + "test_admin_login_with_valid_username_and_valid_password.png")
            self.logger.info(
                "******************** manager Login With Valid Username And Password Failed********************************")
            self.driver.close()
            assert False
        self.file = DirectoryPath()

        sample=self.manager_dashboard.getturbine_list()
        self.logger.info(sample)
        for i in sample:
            self.manager_dashboard.getTurbines(i)
            time.sleep(5)

            self.manager_dashboard.forecast_date(ReadConfig.get_forecast_date())
            self.manager_dashboard.windvariance_chart_submit()
            self.filename = self.file.get_download_dir() + '/' + self.manager_dashboard.list_turbine[i]+'_variance.csv'
            if os.path.isfile(self.filename):


                os.remove(self.filename)
            else:
                print('no file')
            self.manager_dashboard.windvariance_download()
            if os.path.isfile(self.filename):
                assert True
                self.logger.info(
                "**********************In manager {} dashboard Actual v/s Forecasted chart file downloaded succesfully*******************************".format(i))
            else:
                self.driver.save_screenshot(
                "../Screenshots/" + "{}_actual_forecast_downloaded.png".format(i))
                self.logger.info(
                "*************************In manager {} dashboard Actual v/s Forecasted chart file downloaded is failed*************************************".format(i))
                assert False

            df = pd.read_csv(self.filename)
            df_actual = df['Actual Power (KWh)'].sum()
            df_actual = int(df_actual)
            df_actual = str(df_actual)
            print(df_actual)
            df_forecast = df['Forecasted Power (KWh)'].sum()
            df_forecast = int(df_forecast)
            df_forecast = str(df_forecast)
            print(df_forecast)
            actual_power = self.manager_dashboard.total_actual_power_find()
            actual_power = actual_power.split(".")
            print(actual_power)
            forecast_power = self.manager_dashboard.total_forecast_list_power_find()
            forecast_power = forecast_power.split(".")
            print(forecast_power)
            if df_actual == actual_power[0]:
                assert True
                self.logger.info(
                "*************************downloaded {} actual and UI actual power generation are matched successfully****************".format(i))
            else:
                self.driver.save_screenshot(
                "../Screenshots/" + "{}_actualvsuiactual_downloaded.png".format(i))
                self.logger.info(
                "****************************downloaded  {} actual and UI actual power generation are not  matched ********************************".format(i))
                assert False
            self.filename = self.file.get_download_dir() + '/' + self.manager_dashboard.list_turbine[i]+'_forecasted.csv'
            if df_forecast == forecast_power[0]:
                assert True
                self.logger.info(
                "*************************downloaded {} forecast and UI forcast power generation are matched successfully****************".format(i))
            else:
                self.driver.save_screenshot(
                "../Screenshots/" + "{}_forecast_vs_uiforecast_downloaded.png".format(i))
                self.logger.info(
                "****************************downloaded  {} forecast and UI forecast power generation are not  matched ********************************".format(i))
                assert False
            if os.path.isfile(self.filename):

                os.remove((self.filename))
            else:
                print('no file')

            self.manager_dashboard.windform_forecast_button()
            self.manager_dashboard.wind_forecst_download()
            self.file = DirectoryPath()
            if os.path.isfile(self.filename):
                assert True
                self.logger.info(
                "**********************In manager {} dashboard 45 forecast file downloaded succesfully*******************************".format(i))
            else:
                self.driver.save_screenshot(
                "../Screenshots/" + "{}_forecast_45_downloaded.png".format(i))
                self.logger.info(
                "*************************In manager {} dashboard 45 forecast chart file downloaded is failed*************************************".format(i))
                assert False

            self.manager_dashboard.getbackbtn()
            if self.manager_dashboard.getuserdisplay() == "Gvpalli Wind Farm":
                assert True
                self.logger.info(
                "********************back to windform Page successfully********************************")
                self.logger.info("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")


            else:
                self.driver.save_screenshot(
                "../Screenshots/" + "windform_page.png")
                self.logger.info(
                "******************** back to windform Page failed********************************")
                self.logger.info("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")

                assert False
コード例 #4
0
    def test_forcasted_chart_for_all_turbines(self, setup):
        self.logger.info(
            "********************Test all turbines Started********************************"
        )
        self.driver = setup
        self.files = DirectoryPath()
        self.driver.implicitly_wait(200)
        self.login_page = ceo_page(self.driver)
        self.driver.get(self.baseURL)
        self.login_page.get_ceo_screen()
        time.sleep(3)
        self.driver.find_element_by_xpath(
            self.login_page.dashboard_windfarm).click()
        time.sleep(5)
        self.driver.find_element_by_xpath(
            self.login_page.gvpalli_button).click()
        time.sleep(8)
        lst = len(self.driver.find_elements_by_tag_name("tr")) - 1
        for i in range(2, 16):
            self.driver.find_element_by_xpath(
                "//tbody/tr[{0}]".format(i)).click()
            time.sleep(6)
            print(self.driver.current_url, "is displayed")
            self.driver.find_element_by_id(
                self.login_page.forecastDownloadBtn).click()
            time.sleep(4)
            self.filename = self.files.get_download_dir(
            ) + '/' + self.login_page.list_turbine[i] + '_forecasted.csv'
            if os.path.isfile(self.filename) != True:
                print(self.filename, self.login_page.list_turbine[i],
                      ' csv file is not download')
                self.driver.close()
            else:
                with open(self.filename) as fin:
                    csv_reader = csv.reader(fin, delimiter=',')
                    header = next(csv_reader)
                    forcasted = 0
                    for row in csv.reader(fin):
                        print('\n', row)
                        forcasted += float(row[1])

                    ui_forcast = (self.driver.find_element_by_id(
                        self.login_page.forecastedPower).text).replace(
                            'KWh', '')
                    ui_forcast = float(re.sub('\f', "", ui_forcast).strip())

                    forcasted = round(forcasted, 2)

                    print('file value', forcasted, 'ui value', ui_forcast)

                    if forcasted != ui_forcast:
                        print('Difference found at actual generation ',
                              forcasted, ui_forcast)
                        self.driver.save_screenshot(
                            "../Screenshots/" +
                            "test_turbines_actgen_variance.png")
                        assert False

                    os.remove(self.filename)
                self.driver.find_element_by_id(
                    self.login_page.backIcon).click()
            time.sleep(5)
        self.driver.close()
コード例 #5
0
class Test_Atria_CEO_Turbines_Screen:

    baseURL = ReadConfig.getApplicationURL()
    invalid_uname = ReadConfig.get_invalid_Username()
    invalid_pwd = ReadConfig.get_invalid_Password()
    logger = LogGen.ceo_logs()

    #Dashboard Test Scripts

    def test_variance_chart_for_all_turbines(self, setup):
        self.logger.info(
            "********************Test all turbines Started********************************"
        )
        self.driver = setup
        self.files = DirectoryPath()
        self.driver.implicitly_wait(200)
        self.login_page = ceo_page(self.driver)
        self.driver.get(self.baseURL)
        self.login_page.get_ceo_screen()
        time.sleep(3)
        self.driver.find_element_by_xpath(
            self.login_page.dashboard_windfarm).click()
        time.sleep(5)
        self.driver.find_element_by_xpath(
            self.login_page.gvpalli_button).click()
        time.sleep(8)
        lst = len(self.driver.find_elements_by_tag_name("tr")) - 1
        for i in range(2, 16):
            self.driver.find_element_by_xpath(
                "//tbody/tr[{0}]".format(i)).click()
            time.sleep(4)
            print(self.driver.current_url, "is displayed")
            self.driver.find_element_by_id(
                self.login_page.varianceDownloadBtn).click()
            time.sleep(4)
            self.filename = self.files.get_download_dir(
            ) + '/' + self.login_page.list_turbine[i] + '_variance.csv'
            print(self.filename)
            if os.path.isfile(self.filename) != True:
                print(self.login_page.list_turbine[i],
                      ' csv file is not download')
                self.driver.close()
            else:
                with open(self.filename) as fin:
                    csv_reader = csv.reader(fin, delimiter=',')
                    header = next(csv_reader)
                    act_generation = 0
                    forcasted = 0
                    for row in csv.reader(fin):
                        print('\n', row)
                        act_generation += float(row[2])
                        forcasted += float(row[1])
                    actual = (self.driver.find_element_by_id(
                        self.login_page.actualPowerGen).text).replace(
                            'KWh', '')
                    forcast = (self.driver.find_element_by_id(
                        self.login_page.forecastPowerGen).text).replace(
                            'KWh', '')
                    generated = float(re.sub('\f', "", actual).strip())
                    forcasting = float(re.sub('\f', "", forcast).strip())

                    act_generation = round(act_generation, 2)
                    forcasted = round(forcasted, 2)

                    print(act_generation, generated, forcasted, forcasting)

                    if act_generation != generated:
                        print('Difference found at actual generation ',
                              act_generation, generated)
                        self.driver.save_screenshot(
                            "../Screenshots/" +
                            "test_turbines_actgen_variance.png")
                        assert False
                    if forcasted != forcasting:
                        print('Difference found at actual forcasted ',
                              forcasted, forcasting)
                        self.driver.save_screenshot(
                            "../Screenshots/" +
                            "test_turbines_forcast_variance.png")
                        assert False
                    os.remove(self.filename)
                self.driver.find_element_by_id("backIcon").click()
            time.sleep(5)
        self.driver.close()

    def test_forcasted_chart_for_all_turbines(self, setup):
        self.logger.info(
            "********************Test all turbines Started********************************"
        )
        self.driver = setup
        self.files = DirectoryPath()
        self.driver.implicitly_wait(200)
        self.login_page = ceo_page(self.driver)
        self.driver.get(self.baseURL)
        self.login_page.get_ceo_screen()
        time.sleep(3)
        self.driver.find_element_by_xpath(
            self.login_page.dashboard_windfarm).click()
        time.sleep(5)
        self.driver.find_element_by_xpath(
            self.login_page.gvpalli_button).click()
        time.sleep(8)
        lst = len(self.driver.find_elements_by_tag_name("tr")) - 1
        for i in range(2, 16):
            self.driver.find_element_by_xpath(
                "//tbody/tr[{0}]".format(i)).click()
            time.sleep(6)
            print(self.driver.current_url, "is displayed")
            self.driver.find_element_by_id(
                self.login_page.forecastDownloadBtn).click()
            time.sleep(4)
            self.filename = self.files.get_download_dir(
            ) + '/' + self.login_page.list_turbine[i] + '_forecasted.csv'
            if os.path.isfile(self.filename) != True:
                print(self.filename, self.login_page.list_turbine[i],
                      ' csv file is not download')
                self.driver.close()
            else:
                with open(self.filename) as fin:
                    csv_reader = csv.reader(fin, delimiter=',')
                    header = next(csv_reader)
                    forcasted = 0
                    for row in csv.reader(fin):
                        print('\n', row)
                        forcasted += float(row[1])

                    ui_forcast = (self.driver.find_element_by_id(
                        self.login_page.forecastedPower).text).replace(
                            'KWh', '')
                    ui_forcast = float(re.sub('\f', "", ui_forcast).strip())

                    forcasted = round(forcasted, 2)

                    print('file value', forcasted, 'ui value', ui_forcast)

                    if forcasted != ui_forcast:
                        print('Difference found at actual generation ',
                              forcasted, ui_forcast)
                        self.driver.save_screenshot(
                            "../Screenshots/" +
                            "test_turbines_actgen_variance.png")
                        assert False

                    os.remove(self.filename)
                self.driver.find_element_by_id(
                    self.login_page.backIcon).click()
            time.sleep(5)
        self.driver.close()
コード例 #6
0
class ceo_page:

    button_login_id="login"
    dashboard ="dashboard"
    startdate_id="startDate"
    enddate_id="endDate"
    submit_id ="submit"
    submitBtn="submitBtn"
    line_chart_id ="line"
    bar_chart_id="bar"
    download_btn="downloadBtn"

    text_box_username_id = "username"
    text_box_passsword_id = "password"

    varianceDownloadBtn="varianceDownloadBtn"
    turbinesDownloadBtn="turbinesDownloadBtn"
    forecastDownloadBtn="forecastDownloadBtn"

    windfarm_csv="windfarms_variance.csv"
    gvpalli_variance="gvpalli_variance.csv"
    actual_generation="totalActualGen"
    total_forcasted="totalForecastedGen"
    gvpalli_img ="gvpalli"
    home_icon ="dashboardIcon"
    forcasted_Date="varianceasOnDate"
    windfarms ="//a/div"
    gvpalli_button ="//li[@id='gvpalli']"
    forcasted_onDate="forecastedasOnstartDate"
    forecastedendDate="forecastedendDate"
    forecastedSubmitBtn="forecastedSubmitBtn"
    #Windfarm button
    dashboard_windfarm ="//li[2]/a"
    header_userlist_xpath = "//*[@id='primary-content']/div/div[1]/div/div/h3"
    backIcon="backIcon"
    comments="comments"
    com_box="desc"
    edit_box="editDesc0"
    sample_text="Sample Text"
    updated_text="QA Sample Text"
    saveComment="saveComment"
    updatedcomment="editCommentBtn0"
    update_btn="updateComment0"
    delete_comment="deleteCommentBtn0"
    #GVPalli
    actualPowerGen="actualPowerGen"
    forecastPowerGen="forecastPowerGen"

    forecastedPowerGen="forecastedPowerGen"
    gvpalli_forecasted="gvpalli_forecasted.csv"
    forecastedPower="forecastedPower"
    turbinesDownload="turbinesDownloadBtn"
    turbine_details="turbine_details.csv"
    turbine_forcasted ="turbine_forcasted.csv"
    # Turbines
    list_of_turbines="//tr"
    turbine_01="G01"
    turbine_02="G02"
    turbine_03="G03"
    turbine_04="G04"
    tur_actualPowerGen="actualPowerGen"
    tur_forecastPowerGen="forecastPowerGen"
    turbineHistoryDownloadBtn="turbineHistoryDownloadBtn"
    turbine_history ="turbine_history.csv"

    varianceendDate="varianceendDate"
    varianceasOnDate="varianceasOnDate"
    turbines_G01_id = 'G01'
    turbines_G02_id = 'G02'
    turbines_G03_id = 'G03'
    turbines_G04_id = 'G04'
    turbines_G05_id = 'G05'
    turbines_G06_id = 'G06'
    turbines_G07_id = 'G07'
    turbines_G08_id = 'G08'
    turbines_G09_id = 'G09'
    turbines_G10_id = 'G10'
    turbines_G11_id = 'G11'
    turbines_G12_id = 'G12'
    turbines_G13_id = 'G13'
    turbines_G14_id = 'G14'
    turbines_G15_id = 'G15'

    list_turbine = ['G00','G01', 'G02', 'G03','G04','G05','G06','G07','G08','G09','G10','G11','G12','G13','G14','G15']
    start_date="17/01/2021"
    end_date="19/01/2021"
    for_sdate="20/01/2021"
    for_end="22/01/2021"
    line_forsdate="10/01/2021"
    line_foredate="20/02/2021"

    def __init__(self,driver):
        self.driver=driver

    def clickLogin(self):
        self.driver.find_element_by_id(self.button_login_id).click()

    # UserList Methods
    def set_invalid_UserName(self,username):
        self.driver.find_element_by_id(self.text_box_username_id).clear()
        self.driver.find_element_by_id(self.text_box_username_id).send_keys(username)



    def getUserListPage(self):
        txt = self.driver.find_element_by_xpath(self.header_userlist_xpath).text
        return txt

    def get_ceo_screen(self):
        self.driver.maximize_window()
        self.login_page = AdminLogin(self.driver)
        self.login_page.setUserName(ReadConfig.get_ceo_Username())
        self.login_page.setPassword(ReadConfig.get_ceo_Password())
        self.login_page.clickLogin()
        time.sleep(5)

    def getTurbines(self, list):
        self.driver.find_element_by_id(list).click()
        time.sleep(5)

    def check_list_of_turbines(self):
        turs = self.driver.find_elements_by_id()


    def getbackbtn(self):
        self.driver.find_element_by_id(self.backIcon).click()

    def get_turbines_list(self):
        self.driver.find_element_by_xpath("//*[@id='main-menu']/li[2]/a").click()
        lst = self.driver.find_elements_by_css_selector("ul.nav-submenu >li:nth-of-type(n)")
        turbine = []
        for i in lst:
            turbine.append(i.text)
        return turbine

    def check_variance_chart(self):
        self.files = DirectoryPath()
        self.login_page = ceo_page(self.driver)
        self.driver.find_element_by_id(self.login_page.forcasted_onDate).clear()
        time.sleep(2)
        startDate = self.driver.find_element_by_id(self.login_page.forcasted_onDate)
        startDate.send_keys('10/01/2021')
        time.sleep(2)
        self.driver.find_element_by_id(self.login_page.forecastedendDate).clear()
        time.sleep(2)
        endDate = self.driver.find_element_by_id(self.login_page.forecastedendDate)
        endDate.send_keys('20/01/2021')
        time.sleep(2)
        self.driver.find_element_by_id(self.login_page.forecastedSubmitBtn).click()
        time.sleep(3)
        self.driver.find_element_by_id(self.login_page.varianceDownloadBtn).click()
        time.sleep(3)
        self.filename = self.files.get_download_dir() + '/' + self.login_page.gvpalli_variance
        print(self.filename)
        if os.path.isfile(self.filename) != True:
            print('Windfarm variance csv file is not download')
            self.driver.close()
        else:
            with open(self.filename) as fin:
                csv_reader = csv.reader(fin, delimiter=',')
                header = next(csv_reader)
                act_generation = 0
                forcasted = 0
                for row in csv.reader(fin):
                    print('\n', row)
                    act_generation += float(row[2])
                    forcasted += float(row[1])

                actual = (self.driver.find_element_by_id(self.login_page.tur_actualPowerGen).text).replace('KWh', '')
                forcast = (self.driver.find_element_by_id(self.login_page.tur_forecastPowerGen).text).replace('KWh', '')

                generated = float(re.sub('\f', "", actual).strip())
                forcasting = float(re.sub('\f', "", forcast).strip())

                generated = round(generated,2)
                forcasting =  round(forcasting,2)

                act_generation = round(act_generation,2)
                forcasted = round(forcasted,2)
                os.remove(self.filename)
                print(generated, ":", type(generated), act_generation, ":", type(act_generation), forcasting, ":",
                      type(forcasting), forcasted, ":", type(forcasted))

                if str(act_generation) != str(generated):
                    print('Difference found at actual generation ', act_generation, generated)
                if str(forcasted) != str(forcasting):
                    print('Difference found at actual forcasted ', forcasted, forcasting)
                self.driver.close()
            self.driver.close()

    def check_turbines_forcasted_chart(self):
        self.files = DirectoryPath()
        self.login_page = ceo_page(self.driver)
        self.driver.find_element_by_id(self.login_page.forcasted_onDate).clear()
        time.sleep(2)
        startDate = self.driver.find_element_by_id(self.login_page.forcasted_onDate)
        startDate.send_keys('10/01/2021')
        time.sleep(2)
        self.driver.find_element_by_id(self.login_page.forecastedendDate).clear()
        time.sleep(2)
        endDate = self.driver.find_element_by_id(self.login_page.forecastedendDate)
        endDate.send_keys('20/01/2021')
        time.sleep(2)
        self.driver.find_element_by_id(self.login_page.forecastedSubmitBtn).click()
        time.sleep(3)
        self.driver.find_element_by_id(self.login_page.varianceDownloadBtn).click()
        time.sleep(3)
        self.filename = self.files.get_download_dir() + '/' + self.login_page.turbine_02+"_variance.csv"
        print(self.filename)
        if os.path.isfile(self.filename) != True:
            print('Windfarm variance csv file is not download')
            self.driver.close()
        else:
            with open(self.filename) as fin:
                csv_reader = csv.reader(fin, delimiter=',')
                header = next(csv_reader)
                act_generation = 0
                forcasted = 0
                for row in csv.reader(fin):
                    print('\n', row)
                    act_generation += float(row[2])
                    forcasted += float(row[1])

                actual = (self.driver.find_element_by_id(self.login_page.actualPowerGen).text).replace('KWh', '')
                forcast = (self.driver.find_element_by_id(self.login_page.forecastPowerGen).text).replace('KWh', '')

                generated = float(re.sub('\f', "", actual).strip())
                forcasting = float(re.sub('\f', "", forcast).strip())

                generated = round(generated, 2)
                forcasting = round(forcasting, 2)

                act_generation = round(act_generation, 2)
                forcasted = round(forcasted, 2)
                os.remove(self.filename)
                print(generated,":",type(generated),act_generation,":",type(act_generation),forcasting,":",type(forcasting),forcasted,":",type(forcasted))
                if int(act_generation) != int(generated):
                    print('Difference found at actual generation ', act_generation, generated)
                if int(forcasted) != int(forcasting):
                    print('Difference found at actual forcasted ', forcasted, forcasting)
コード例 #7
0
class Test_Manager_dashboard:
    baseURL = ReadConfig.getApplicationURL()
    manager_username = ReadConfig.getmanager_username()
    manager_password = ReadConfig.getmanager_password()
    logger = managerLogGen.logen()

    def test_manager_dashboard(self, setup):
        self.driver = setup
        self.driver.get(self.baseURL)
        self.manager_dashboard = ManagerLogin(self.driver)
        self.manager_dashboard.setUserName(ReadConfig.getmanager_username())
        self.manager_dashboard.setPassword(ReadConfig.getmanager_password())
        self.manager_dashboard.clickLogin()
        self.files = DirectoryPath()
        if self.manager_dashboard.getuserdisplay() == "Gvpalli Wind Farm":
            assert True
            self.logger.info(
                "********************Test manager Login With Valid Username And Password successfully login********************************"
            )

            self.manager_dashboard.forecast_date(
                ReadConfig.get_forecast_date())
            # self.manager_dashboard.start_date(ReadConfig.get_start_date())
            # self.manager_dashboard.end_date(ReadConfig.get_end_date())
            self.manager_dashboard.windvariance_chart_submit()
            self.filename = self.files.get_download_dir(
            ) + '/' + self.manager_dashboard.gpalli_variance_csv
            if os.path.isfile(self.filename):

                os.remove((self.filename))
            else:
                print('no file')
            self.manager_dashboard.windvariance_download()

            if os.path.isfile(self.filename):
                assert True
                self.logger.info(
                    "**********************In manager dashboard Actual v/s Forecasted chart file downloaded succesfully*******************************"
                )
            else:
                self.driver.save_screenshot("../Screenshots/" +
                                            "actual_forecast_downloaded.png")
                self.logger.info(
                    "*************************In manager dashboard Actual v/s Forecasted chart file downloaded is failed*************************************"
                )
                assert False
            df = pd.read_csv(
                r'C:\Users\sanjeev\PycharmProjects\AtriaTesting-2.0\Downloads\gvpalli_variance.csv'
            )
            df_actual = df['Actual Power (MWh)'].sum()
            df_actual = str(df_actual)
            df_forecast = df['Forecasted Power (MWh)'].sum()
            df_forecast = str(df_forecast)
            actual_power = self.manager_dashboard.total_actual_power_find()
            actual_power = actual_power.split(" ")
            forecast_power = self.manager_dashboard.total_forecast_power_find()
            forecast_power = forecast_power.split(" ")

            if df_actual == actual_power[0]:
                assert True
                self.logger.info(
                    "*************************downloaded actual and UI actual power generation are matched successfully****************"
                )
            else:
                self.driver.save_screenshot("../Screenshots/" +
                                            "actualvsuiactual_downloaded.png")
                self.logger.info(
                    "****************************downloaded actual and UI actual power generation are not  matched ********************************"
                )
                assert False

            if df_forecast == forecast_power[0]:
                assert True
                self.logger.info(
                    "*************************downloaded forecast and UI forcast power generation are matched successfully****************"
                )
            else:
                self.driver.save_screenshot(
                    "../Screenshots/" +
                    "forecast_vs_uiforecast_downloaded.png")
                self.logger.info(
                    "****************************downloaded forecast and UI forecast power generation are not  matched ********************************"
                )
                assert False

            if os.path.isfile('gvpalli_forecasted.csv'):

                os.remove((
                    r'C:\Users\sanjeev\PycharmProjects\AtriaTesting-2.0\Downloads\gvpalli_forecasted.csv'
                ))
            else:
                print('no file')

            self.manager_dashboard.windform_forecast_button()
            self.manager_dashboard.wind_forecst_download()
            self.file = DirectoryPath()
            self.filename = self.file.get_download_dir(
            ) + '/' + self.manager_dashboard.gvpalli_forecasted_csv
            df = pd.read_csv(self.filename)
            df_forecast_45 = df['Forecasted Power (MWh)'].sum()
            df_forecast_45 = str(df_forecast_45)
            forecast_45_power = self.manager_dashboard.windform_future_45_forecast(
            )
            forecast_45_power = forecast_45_power.split(" ")
            if df_forecast_45 == forecast_45_power[0]:
                assert True
                self.logger.info(
                    "*************************downloaded 45_forecast and UI 45_forcast power generation are matched successfully****************"
                )
            else:
                self.driver.save_screenshot(
                    "../Screenshots/" +
                    "45forecast_vs_ui_45forecast_downloaded.png")
                self.logger.info(
                    "****************************downloaded 45_forecast and UI 45_forecast power generation are not  matched ********************************"
                )
                assert False
            if os.path.isfile(
                    r'C:\Users\sanjeev\PycharmProjects\AtriaTesting-2.0\Downloads\gvpalli_forecasted.csv'
            ):

                os.remove(self.filename)
            else:
                print('no file')

            self.manager_dashboard.windform_forecast_date(
                ReadConfig.get_future_forecast_date())
            self.manager_dashboard.windform_forecast_button()

            self.manager_dashboard.wind_forecst_download()
            self.file = DirectoryPath()
            self.filename = self.file.get_download_dir(
            ) + '/' + self.manager_dashboard.gvpalli_forecasted_csv
            if os.path.isfile(self.filename):
                assert True
                self.logger.info(
                    "**********************In manager dashboard 45 forecast file downloaded succesfully*******************************"
                )
            else:
                self.driver.save_screenshot("../Screenshots/" +
                                            "forecast_45_downloaded.png")
                self.logger.info(
                    "*************************In manager dashboard 45 forecast chart file downloaded is failed*************************************"
                )
                assert False

        else:
            self.driver.save_screenshot(
                "../Screenshots/" +
                "test_admin_login_with_valid_username_and_valid_password.png")
            self.logger.info(
                "******************** manager Login With Valid Username And Password Failed********************************"
            )
            self.driver.close()
            assert False