setup = SetUp()

# login(setup, "cmathieu", "a")

login(setup, "admin", "Admin@123")
exploreScreenInstance = ExplorePageClass(setup.d)
exploreHandle = getHandle(setup, "explore_Screen")
# exploreScreenInstance.exploreList.launchScreen(exploreHandle,"exploreList","nf_Screen")

# exploreScreenInstance.exploreList.switchApp(exploreHandle,1)

# Reports Module
####################################
exploreScreenInstance.exploreList.launchModule(exploreHandle, "REPORTS")
reportScreenInstance = ReportsModuleClass(setup.d)
reportScreenHandle = getHandle(setup, "report_Screen")
sleep(5)
reportScreenInstance.launchCreateReport(setup.d)
grPopInstance = GenerateReportsPopClass(setup.d)
grPopHandle = getHandle(setup, "report2_popup")
grPopInstance.reportspopup.selectRadioButton("Average", grPopHandle)
# reportScreenInstance.reportpopup.selectRadioButton("Peak",grPopHandle)
grPopInstance.reportspopup.clickButton("Next Step", grPopHandle)

grPopInstance.routertable.getTableData1(grPopHandle, 'table')

# reportScreenInstance.dropdown.customClick(reportScreenHandle['report']['create'])

# launchPage(setup,"nf_Screen")
# nfScreenInstance = NFPageClass(setup.d)
Esempio n. 2
0
# grPopInstance.dropdown.doSelection(grPopHandle,"Average","generateReportDialog","measureType")
grPopInstance.dropdown.doSelection(grPopHandle,"Top IP Talker Report","generateReportDialog","reportType")
# grPopInstance.dropdown.doSelection(grPopHandle,"Yesterday","generateReportDialog","quicklink")
grPopInstance.dropdown.customSendkeys(grPopHandle['generateReportDialog']["reportName"],"TopIP")
grPopInstance.dropdown.customClick(grPopHandle['generateReportDialog']["addemail"])
grPopInstance.dropdown.customSendkeys(grPopHandle['generateReportDialog']["emailInput"],"*****@*****.**")
# grPopInstance.dropdown.customClick(grPopHandle['generateReportDialog']["generate"])
grPopInstance.dropdown.customClick(grPopHandle['generateReportDialog']["close"])
# grPopHandle = getHandle(setup,"report_popup")
# grPopInstance.dropdown.customClick(grPopHandle['successdialog']["ok"])



exploreHandle = getHandle(setup,"explore_Screen")
exploreScreenInstance.exploreList.launchModule(exploreHandle,"REPORTS")
reportScreenInstance = ReportsModuleClass(setup.d)
reportScreenHandle = getHandle(setup,"report_Screen")
data = reportScreenInstance.table.getTableData1(reportScreenHandle,"table")
result = data['rows'][0][1]
# print data['header']
# print data['rows']
# print data['rows']['00']
# print data['rows']['00'][0]
# print data['rows'][0]
# print data['rows'][1]
# print data['rows'][2]
print data['rows'][0][1]


checkEqualAssert(result,"sitereports","","","Network Element Report is verified")
from Utils.logger import *
from selenium import webdriver

from Utils.utility import *
from classes.DriverHelpers.DriverHelper import DriverHelper
from Utils.Constants import *
from Utils.SetUp import *
from classes.Pages.NFPageClass import *
from classes.Pages.QuickTrendsPageClass import *
from classes.Pages.GenerateReportsPopClass import *
from classes.Pages.ReportsModuleClass import *
import random

setup = SetUp()

login(setup, "admin", "Admin@123")
exploreScreenInstance = ExplorePageClass(setup.d)
exploreHandle = getHandle(setup,"explore_Screen","appHeader")

exploreScreenInstance.exploreList.launchModule(exploreHandle,"REPORTS")

reports = ["Gateway Traffic"]
for i in range(len(reports)):

    reportScreenInstance = ReportsModuleClass(setup.d)
    reportScreenHandle = getHandle(setup,"report_Screen")

    reportScreenInstance.launchCreateReport1(setup.d)
    grPopInstance = GenerateReportsPopClass(setup.d)
    grPopHandle = getHandle(setup,"report2_popup","radios")
    grPopInstance.reportspopup.selectRadioButton(reports[i],grPopHandle,"label")