projecte_ionic/node_modules/protractor/built/runner.d.ts
2022-02-09 18:30:03 +01:00

105 lines
3.3 KiB
TypeScript
Executable file

/// <reference types="node" />
/// <reference types="q" />
import { EventEmitter } from 'events';
import * as q from 'q';
import { promise as wdpromise } from 'selenium-webdriver';
import { ProtractorBrowser } from './browser';
import { Config } from './config';
import { DriverProvider } from './driverProviders';
import { Plugins } from './plugins';
export declare class Runner extends EventEmitter {
config_: Config;
preparer_: any;
driverprovider_: DriverProvider;
o: any;
plugins_: Plugins;
restartPromise: q.Promise<any>;
frameworkUsesAfterEach: boolean;
ready_?: wdpromise.Promise<void>;
constructor(config: Config);
/**
* Registrar for testPreparers - executed right before tests run.
* @public
* @param {string/Fn} filenameOrFn
*/
setTestPreparer(filenameOrFn: string | Function): void;
/**
* Executor of testPreparer
* @public
* @param {string[]=} An optional list of command line arguments the framework will accept.
* @return {q.Promise} A promise that will resolve when the test preparers
* are finished.
*/
runTestPreparer(extraFlags?: string[]): q.Promise<any>;
/**
* Called after each test finishes.
*
* Responsible for `restartBrowserBetweenTests`
*
* @public
* @return {q.Promise} A promise that will resolve when the work here is done
*/
afterEach(): q.Promise<void>;
/**
* Grab driver provider based on type
* @private
*
* Priority
* 1) if directConnect is true, use that
* 2) if seleniumAddress is given, use that
* 3) if a Sauce Labs account is given, use that
* 4) if a seleniumServerJar is specified, use that
* 5) try to find the seleniumServerJar in protractor/selenium
*/
loadDriverProvider_(config: Config): void;
/**
* Responsible for cleaning up test run and exiting the process.
* @private
* @param {int} Standard unix exit code
*/
exit_: (exitCode: number) => any;
/**
* Getter for the Runner config object
* @public
* @return {Object} config
*/
getConfig(): Config;
/**
* Get the control flow used by this runner.
* @return {Object} WebDriver control flow.
*/
controlFlow(): any;
/**
* Sets up convenience globals for test specs
* @private
*/
setupGlobals_(browser_: ProtractorBrowser): void;
/**
* Create a new driver from a driverProvider. Then set up a
* new protractor instance using this driver.
* This is used to set up the initial protractor instances and any
* future ones.
*
* @param {Plugin} plugins The plugin functions
* @param {ProtractorBrowser=} parentBrowser The browser which spawned this one
*
* @return {Protractor} a protractor instance.
* @public
*/
createBrowser(plugins: any, parentBrowser?: ProtractorBrowser): any;
/**
* Final cleanup on exiting the runner.
*
* @return {q.Promise} A promise which resolves on finish.
* @private
*/
shutdown_(): q.Promise<void>;
/**
* The primary workhorse interface. Kicks off the test running process.
*
* @return {q.Promise} A promise which resolves to the exit code of the tests.
* @public
*/
run(): q.Promise<any>;
}