@openfin/automation-helpers
Advanced tools
Comparing version 0.3.4 to 0.3.5
{ | ||
"name": "@openfin/automation-helpers", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "Helper methods for automation testing in the OpenFin ecosystem", | ||
@@ -5,0 +5,0 @@ "author": "martyn.janes@openfin.co", |
@@ -16,2 +16,10 @@ import type { ThenableWebDriver } from "selenium-webdriver"; | ||
currentTestName?: string; | ||
/** | ||
* The path to the OpenFin RVM. | ||
*/ | ||
openFinRVMPath?: string; | ||
/** | ||
* The port the devtools is running on. | ||
*/ | ||
devToolsPort?: number; | ||
} | ||
@@ -18,0 +26,0 @@ export declare var webDriver: IWebDriver; |
@@ -17,6 +17,7 @@ import type { IWebDriverElement } from "./IWebDriverElement"; | ||
* @param screenshotFolder The folder for storing screen shots. | ||
* @param openFinRVMPath The path to the OpenFin RVM. | ||
* @returns Nothing. | ||
* @see https://w3c.github.io/webdriver/#dfn-new-sessions | ||
*/ | ||
startSession(devToolsPort: number, chromeDriverPort: number, logLevel: "debug" | "silent", screenshotFolder: string): Promise<void>; | ||
startSession(devToolsPort: number, chromeDriverPort: number, logLevel: "debug" | "silent", screenshotFolder: string, openFinRVMPath: string): Promise<void>; | ||
/** | ||
@@ -23,0 +24,0 @@ * End a session on the driver. |
@@ -0,1 +1,2 @@ | ||
import type OpenFin from "@openfin/core"; | ||
/** | ||
@@ -2,0 +3,0 @@ * Web driver window interface. |
@@ -0,1 +1,3 @@ | ||
/// <reference types="node" /> | ||
import { type ChildProcess } from "child_process"; | ||
/** | ||
@@ -19,2 +21,16 @@ * Methods for OpenFin System object handling. | ||
static launchManifestInSecurityRealm(manifest: string, name: string, realm: string): Promise<boolean>; | ||
/** | ||
* Spawn a child and display the output. | ||
* @param process The process to spawn. | ||
* @param args The arguments for the app. | ||
* @param options The options to launch with. | ||
* @param options.shell Launch as shell with unsanitized args. | ||
* @param hideOutput Hide the output. | ||
* @param hideErrors Ignore errors in the output. | ||
* @param endCallback Callback to call when the task completes. | ||
* @returns The spawned process. | ||
*/ | ||
static spawnWithOutput(process: string, args?: string[], options?: { | ||
shell: boolean; | ||
}, hideOutput?: boolean, hideErrors?: boolean, endCallback?: (output: string, error: string) => void): ChildProcess; | ||
} |
@@ -84,5 +84,6 @@ import type { IWebDriver } from "../models/IWebDriver"; | ||
* @param handle The window to switch to. | ||
* @param activateNativeWindow Activate the native window as well. | ||
* @returns True if switched to the window. | ||
*/ | ||
protected abstract safeSwitchToWindow(handle: string): Promise<boolean>; | ||
protected abstract safeSwitchToWindow(handle: string, activateNativeWindow: boolean): Promise<boolean>; | ||
} |
@@ -23,6 +23,7 @@ import { type Client } from "webdriver"; | ||
* @param screenshotFolder The folder for storing screen shots. | ||
* @param openFinRVMPath The path to the OpenFin RVM. | ||
* @returns Nothing. | ||
* @see https://w3c.github.io/webdriver/#dfn-new-sessions | ||
*/ | ||
startSession(devToolsPort: number, chromeDriverPort: number, logLevel: "debug" | "silent", screenshotFolder: string): Promise<void>; | ||
startSession(devToolsPort: number, chromeDriverPort: number, logLevel: "debug" | "silent", screenshotFolder: string, openFinRVMPath: string): Promise<void>; | ||
/** | ||
@@ -106,5 +107,6 @@ * End a session on the driver. | ||
* @param handle The window to switch to. | ||
* @param activateNativeWindow Activate the native window as well. | ||
* @returns True if switched to the window. | ||
*/ | ||
protected safeSwitchToWindow(handle: string): Promise<boolean>; | ||
protected safeSwitchToWindow(handle: string, activateNativeWindow: boolean): Promise<boolean>; | ||
} |
@@ -27,6 +27,7 @@ import { type ThenableWebDriver } from "selenium-webdriver"; | ||
* @param screenshotFolder The folder for storing screen shots. | ||
* @param openFinRVMPath The path to the OpenFin RVM. | ||
* @see https://w3c.github.io/webdriver/#dfn-new-sessions | ||
* @returns Nothing. | ||
*/ | ||
startSession(devToolsPort: number, chromeDriverPort: number, logLevel: "debug" | "silent", screenshotFolder: string): Promise<void>; | ||
startSession(devToolsPort: number, chromeDriverPort: number, logLevel: "debug" | "silent", screenshotFolder: string, openFinRVMPath: string): Promise<void>; | ||
/** | ||
@@ -109,5 +110,6 @@ * End a session on the driver. | ||
* @param handle The window to switch to. | ||
* @param activateNativeWindow Activate the native window as well. | ||
* @returns True if switched to the window. | ||
*/ | ||
protected safeSwitchToWindow(handle: string): Promise<boolean>; | ||
protected safeSwitchToWindow(handle: string, activateNativeWindow: boolean): Promise<boolean>; | ||
} |
Sorry, the diff of this file is too big to display
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
499201
5712
2