UNPKG

tlc-core-automation-framework-v3-wdio-v9

Version:

Background: - We are following multi-layer automation framework architecture using webdriver.io + cucumber + typescript This core framework has been implemented with generic utility functions and cucumber steps, which can be easily consumed by another fra

102 lines (101 loc) 4.13 kB
export declare const config: { specs: string[]; exclude: any[]; injectGlobals: boolean; capabilities: { maxInstances: number; browserName: string; acceptInsecureCerts: boolean; 'wdio:enforceWebDriverClassic': boolean; 'goog:chromeOptions': { args: string[]; mobileEmulation: { deviceName: string; }; prefs: { 'profile.default_content_setting_values.geolocation': boolean; 'profile.password_manager_enabled': boolean; credentials_enable_service: boolean; password_manager_enabled: boolean; }; }; }[]; logLevel: string; bail: number; baseUrl: string; pageId: string; waitforTimeout: number; connectionRetryTimeout: number; connectionRetryCount: number; framework: string; reporters: string[]; cucumberOpts: { require: string[]; backtrace: boolean; requireModule: any[]; dryRun: boolean; failFast: boolean; snippets: boolean; source: boolean; strict: boolean; tagExpression: string; timeout: number; ignoreUndefinedDefinitions: boolean; }; /** * Gets executed once before all workers get launched. * @param {Object} config wdio configuration object * @param {Array.<Object>} capabilities list of capabilities details */ /** * Gets executed before a worker process is spawned and can be used to initialise specific service * for that worker as well as modify runtime environments in an async fashion. * @param {String} cid capability id (e.g 0-0) * @param {[type]} caps object containing capabilities for session that will be spawn in the worker * @param {[type]} specs specs to be run in the worker process * @param {[type]} args object that will be merged with the main configuration once worker is initialized * @param {[type]} execArgv list of string arguments passed to the worker process */ /** * Gets executed just after a worker process has exited. * @param {String} cid capability id (e.g 0-0) * @param {Number} exitCode 0 - success, 1 - fail * @param {[type]} specs specs to be run in the worker process * @param {Number} retries number of retries used */ /** * Gets executed just before initialising the webdriver session and test framework. It allows you * to manipulate configurations depending on the capability or spec. * @param {Object} config wdio configuration object * @param {Array.<Object>} capabilities list of capabilities details * @param {Array.<String>} specs List of spec file paths that are to be run * @param {String} cid worker id (e.g. 0-0) */ beforeSession: (config: any, capabilities: any, specs: any, cid: any) => void; /** * Gets executed before test execution begins. At this point you can access to all global * variables like `browser`. It is the perfect place to define custom commands. * @param {Array.<Object>} capabilities list of capabilities details * @param {Array.<String>} specs List of spec file paths that are to be run * @param {Object} browser instance of created browser/device session */ /** * Runs before a WebdriverIO command gets executed. * @param {String} commandName hook command name * @param {Array} args arguments that command would receive */ /** * Cucumber Hooks * * Runs before a Cucumber Feature. * @param {String} uri path to feature file * @param {GherkinDocument.IFeature} feature Cucumber feature object */ /** * * Runs before a Cucumber Scenario. * @param {ITestCaseHookParameter} world world object containing information on pickle and test step * @param {Object} context Cucumber World object */ beforeScenario: (world: any, context: any) => void; };