@wdio/browserstack-service
Version:
WebdriverIO service for better Browserstack integration
89 lines • 3.31 kB
TypeScript
import type AutomationFrameworkInstance from '../instances/automationFrameworkInstance.js';
import type TrackedContext from '../instances/trackedContext.js';
/**
* AutomationFramework - Automation Framework abstract class
*/
export default class AutomationFramework {
#private;
static instances: Map<any, any>;
static KEY_AUTOMATION_SESSIONS: string;
static KEY_NON_BROWSERSTACK_AUTOMATION_SESSIONS: string;
/**
* Constructor for the AutomationFramework
* @param {string} automationFrameworkName - Name of the automation framework
* @param {string} automationFrameworkVersion - Version of the automation framework
*/
constructor(automationFrameworkName: string, automationFrameworkVersion: string);
/**
* Get the automation framework name
* @returns {string} The name of the automation framework
*/
getAutomationFrameworkName(): string;
/**
* Get the automation framework version
* @returns {string} The version of the automation framework
*/
getAutomationFrameworkVersion(): string;
/**
* Track an event
* @param {Object}
* @param {Object}
* @param {Object}
* @returns {void}
*/
trackEvent(automationFrameworkState: State, hookState: State, args?: unknown): Promise<void>;
/**
*
* @param {*} instance
* @param {*} automationFrameworkState
* @param {*} hookState
* @param {*} args
*/
runHooks(instance: AutomationFrameworkInstance, automationFrameworkState: State, hookState: State, args?: unknown): Promise<void>;
/**
* Register an observer
* @returns {void}
*/
static registerObserver(automationFrameworkState: State, hookState: State, callback: Function): void;
/**
* Set the tracked instance
* @param {TrackedInstance} context - The context
* @param {TrackedInstance} instance - The instance
* @returns {void}
*/
static setTrackedInstance(context: TrackedContext, instance: AutomationFrameworkInstance): void;
/**
* Get the tracked instance
* @returns {TrackedInstance} The tracked instance
*/
static getTrackedInstance(): any;
/**
* Set the state
* @param {TrackedInstance} instance - The instance
* @param {string} key - The key
* @param {*} value - The value
* @returns
*/
static setState(instance: AutomationFrameworkInstance, key: string, value: unknown): void;
/**
* Get the state
* @param {TrackedInstance} instance - The instance
* @param {string} key - The key
* @returns {*} The state
*/
static getState(instance: AutomationFrameworkInstance, key: string): any;
static isAutomationSession(instance: AutomationFrameworkInstance): boolean;
/**
* Set the driver for the automation framework instance
* @param {AutomationFrameworkInstance} instance - The automation framework instance
* @param {*} driver - The driver object
*/
static setDriver(instance: AutomationFrameworkInstance, driver: unknown): void;
/**
* Get the driver from the automation framework instance
* @param {AutomationFrameworkInstance} instance - The automation framework instance
* @returns {*} The driver object or null
*/
static getDriver(instance: AutomationFrameworkInstance): unknown;
}
//# sourceMappingURL=automationFramework.d.ts.map