import json sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) import datetime from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeqcutils import eeBookJson from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookSearchAvailability_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) class EEBKG_SA_Validations(TestFixturesUIBaseClass): """ Used for running eeBook Flight Search Screen test suite. """ def __init__(self, tcNumber): super(EEBKG_SA_Validations, self).__init__( tcNumber, logFileName="logs/eeBookSearchAvailability_TestSuite", uiErrorSelectors=[(By.XPATH, "//div[@class='alert alert-danger']//small")])
import sys import os sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) from eeqcutils.universalCaseReader import UniversalCaseReader from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookFareRulesModal_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) filePath = "./AvailabilityScreen/{}_EEBKG_AV_PaxAndFltCombinations.csv".format(airline.upper()) testData = UniversalCaseReader.getCasesFromFile(filePath) class EEBKG_AV_FareRulesModal(TestFixturesUIBaseClass): """ Used for running eeBook Fare Rules Modal test suite. """ def __init__(self, tcNumber): super(EEBKG_AV_FareRulesModal, self).__init__( tcNumber, logFileName="logs/eeBookFareRulesModal_TestSuite", uiErrorSelectors=[(By.XPATH, "//div[@class='alert alert-danger']//small")])
import sys import os sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) from eeqcutils.universalCaseReader import UniversalCaseReader from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookFlightDetailsModal_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) filePath = "./AvailabilityScreen/{}_EEBKG_AV_PaxAndFltCombinations.csv".format( airline.upper()) testData = UniversalCaseReader.getCasesFromFile(filePath) class EEBKG_AV_FlightDetailsModal(TestFixturesUIBaseClass): """ Used for running eeBook Flight Details Modal test suite. """ def __init__(self, tcNumber): super(EEBKG_AV_FlightDetailsModal, self).__init__( tcNumber,
sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) import random from datetime import date, timedelta from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookTCV.tcvIBEUtils.CommonFunctions import waitForSplashScreenToDissapear from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookDropdownValidation_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) # generate random date (for enterTestCase) randomDate = (date.today() + timedelta(random.randint(90, 95))).strftime("%d.%m.%Y") # save formatted elements and their locators as key/value pairs (e.g. "title_adult-passenger-1": "id") dropdownElements = {} testData = [ # Valid dropdown values { "title": [1, 2, 3], "gender": [1, 2],
import os import suds sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) from eeqcutils.universalCaseReader import UniversalCaseReader from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookCalendarPrices_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) filePath = "./AvailabilityScreen/{}_EEBKG_AV_PaxAndFltCombinations.csv".format( airline.upper()) testData = UniversalCaseReader.getCasesFromFile(filePath) class EEBKG_AV_CalendarDatesAndPrices(TestFixturesUIBaseClass): """ Used for running eeBook Calendar Dates and Prices Screen test suite. """ def __init__(self, tcNumber): super(EEBKG_AV_CalendarDatesAndPrices, self).__init__(tcNumber,
import os sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) from eeqcutils.universalCaseReader import UniversalCaseReader from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookBasketHidden_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) filePath = "./SummaryScreen/{}_EEBKG_SS_PaxAndFltCombinations.csv".format( cfg.airline.upper()) testData = UniversalCaseReader.getCasesFromFile(filePath) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) class EEBKG_SS_BasketHidden(TestFixturesUIBaseClass): """ Used for running eeBook Hidden Basket test suite. """ def __init__(self, tcNumber): super(EEBKG_SS_BasketHidden, self).__init__(tcNumber,
import pymysql from pprint import pprint from deepdiff import DeepDiff from eeqcutils import configurator, initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM cfg = configurator.Configurator() dbConnection = pymysql.connect(host=cfg.host, port=cfg.port, user=cfg.user, passwd=cfg.passwd, db=cfg.db) baseURL = cfg.URL initlog.removeOldFile("eeBook_eePay_Compare_Payments.py", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) logger = initlog.Logger("logs/eeBook_eePay_Check_TestSuite_%s" % cfg.gridHost, multipleLogs=True).getLogger() airline = cfg.airline environment = cfg.environment sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) class PaymentInfo: """ """ def __init__(self, pnr, status, method, currency): self.pnr = pnr self.status = str(status)
import unittest2 as unittest sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) from eeqcutils.universalCaseReader import UniversalCaseReader from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookIncludedBags_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) filePath = "./SummaryScreen/{}_EEBKG_SS_PaxAndFltCombinations.csv".format( cfg.airline.upper()) testData = UniversalCaseReader.getCasesFromFile(filePath) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) class EEBKG_SS_IncludedBags(TestFixturesUIBaseClass): """ Used for running eeBook Included checked and cabin Bags test suite. """ def __init__(self, tcNumber): super(EEBKG_SS_IncludedBags, self).__init__(tcNumber,
sys.path.append("..") sys.path.append(os.getcwd()) import random import json import requests from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg airline = cfg.airline baseURL = "http://qba.2e-systems.com:7200/qcpay/" headers = {"Content-Type": "application/json"} initlog.removeOldFile("eeBook_eePayFieldsValidation_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) with open("./eePay/testData_eePayFieldsValidation") as json_file: widgetData = json.load(json_file) # save formatted elements and their locators as key/value pairs eePayElements = {} testData = [ # Valid input field data for CC { "nameOnCard": "Tom Bombadil-Piccard", "cardNumber": "4111111111111111", "expiryDate": "0121",
import sys import os sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) from eeqcutils.universalCaseReader import UniversalCaseReader from eeqcutils.standardSeleniumImports import * from eeqcutils import initlog from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookShoppingBasketComparison_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) filePath = "./AvailabilityScreen/{}_EEBKG_AV_PaxAndFltCombinations.csv".format(airline.upper()) testData = UniversalCaseReader.getCasesFromFile(filePath) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) class EEBKG_AV_ShoppingBasketComparison(TestFixturesUIBaseClass): """ Used for running eeBook Shopping Basket comparison test suite. """ def __init__(self, tcNumber): super(EEBKG_AV_ShoppingBasketComparison, self).__init__( tcNumber, logFileName="logs/eeBookShoppingBasketComparison_TestSuite",
# eeBookGEN root folder and not the folder where this script actually is... import os import sys import glob sys.path.append("../eeqcutils") sys.path.append("..") sys.path.append(os.getcwd()) from eeqcutils import initlog from deepdiff import DeepDiff import unittest2 as unittest from eeBookGEN.eeBookToAmadeusComparison import eeBookToAmadeusCompareLib from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg # cfg = configurator.Configurator() initlog.removeOldFile("eeBook_to_Amadeus_Comparison_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) logger = initlog.Logger("logs/eeBook_to_Amadeus_Comparison_%s" % cfg.gridHost, multipleLogs=True).getLogger() # airline specific parameters: airline = cfg.airline clientcode = 'BWA' system = 'development' officeID = 'FLLBW00MA' # PNRs for testing will be collected from the latest created PNR file or supply a path manually PNRpath = ("../eeBook{}/createdPNRs/*".format((airline).upper())) fileOfJsonStrings = max(glob.iglob(PNRpath), key=os.path.getctime) #fileOfJsonStrings = "../eeBookBWA/createdPNRs/created_PNRs_16.10.2020_07_00_01.txt"
import random import string from datetime import date, timedelta, datetime from dateutil.parser import parse # from eeqcutils.chromeScreenShooter import chromeTakeFullScreenshot from eeqcutils.standardSeleniumImports import * from eeqcutils import configurator, initlog from eeBookTCV.tcvIBEUtils.CommonFunctions import waitForSplashScreenToDissapear from eeBookGEN.parametersGenerator import ScriptParameters from eeBookBWA.bwaIBELib import bwaIbeMain as bIM from eeBookTCV.tcvIBELib import tcvIbeMain as tIM from eeqcutils.TestFixturesUI import TestFixturesUIBaseClass, cfg baseURL = cfg.URL airline = cfg.airline initlog.removeOldFile("eeBookTravelDocumentValidation_TestSuite_", "./logs/", 30) initlog.removeOldFile("TC#", "./screenshots/", 30) initlog.removeOldFile("test_", "./screenshots/", 30) sp = ScriptParameters(airline, airlineClass=bIM if airline == "bwa" else tIM) # generate random dates (for enterTestCase) randomOutboundDate = (date.today() + timedelta(random.randint(90, 95))).strftime("%d.%m.%Y") randomInboundDate = (date.today() + timedelta(random.randint(100, 105))).strftime("%d.%m.%Y") # save formatted elements and their locators as key/value pairs (e.g. "nationality_adult-passenger-1": "id") travelDocumentElements = {} testData = [ # Valid travel doc info {