コード例 #1
0
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")])

    def test_UndefinedRoute(self):
        """
コード例 #2
0
from datetime import date, timedelta
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

# cfg = configurator.Configurator()
baseURL = cfg.URL
airline = cfg.airline
initlog.removeOldFile("eeBookFieldsValidation_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 string (for names or relationship field)
randomString = ''.join(
    random.choice(string.ascii_lowercase) for x in range(61))

# 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. "email_adult-passenger-1": "id")
passengerElements = {}
emergencyContactElements = {}

testData = [  # Valid input field data
    {
コード例 #3
0
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],
        "phoneCode": [i for i in range(1, sp.numberOfCountries(airline))],
        "fqtvProgram": 1
    },
# 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
    {
        "nationality": [i for i in range(1, sp.numberOfCountries(airline))],
        "docType":
        sp.documentType,