diff --git a/lib/commands/app-management.js b/lib/commands/app-management.js index 4d32a7b..6b3458a 100644 --- a/lib/commands/app-management.js +++ b/lib/commands/app-management.js @@ -21,11 +21,12 @@ const commands = {}; * @param {LaunchAppOptions} opts */ commands.macosLaunchApp = async function macosLaunchApp (opts) { - const { bundleId, environment } = opts ?? {}; + const { bundleId, environment, path } = opts ?? {}; return await this.wda.proxy.command('/wda/apps/launch', 'POST', { arguments: opts.arguments, environment, bundleId, + path, }); }; @@ -44,8 +45,8 @@ commands.macosLaunchApp = async function macosLaunchApp (opts) { * @param {ActivateAppOptions} opts */ commands.macosActivateApp = async function macosActivateApp (opts) { - const { bundleId } = opts ?? {}; - return await this.wda.proxy.command('/wda/apps/activate', 'POST', { bundleId }); + const { bundleId, path } = opts ?? {}; + return await this.wda.proxy.command('/wda/apps/activate', 'POST', { bundleId, path }); }; /** @@ -65,8 +66,8 @@ commands.macosActivateApp = async function macosActivateApp (opts) { * `false` if the app was not running before. */ commands.macosTerminateApp = async function macosTerminateApp (opts) { - const { bundleId } = opts ?? {}; - return await this.wda.proxy.command('/wda/apps/terminate', 'POST', { bundleId }); + const { bundleId, path } = opts ?? {}; + return await this.wda.proxy.command('/wda/apps/terminate', 'POST', { bundleId, path }); }; /** @@ -87,8 +88,8 @@ commands.macosTerminateApp = async function macosTerminateApp (opts) { * for more details */ commands.macosQueryAppState = async function macosQueryAppState (opts) { - const { bundleId } = opts ?? {}; - return await this.wda.proxy.command('/wda/apps/state', 'POST', { bundleId }); + const { bundleId, path } = opts ?? {}; + return await this.wda.proxy.command('/wda/apps/state', 'POST', { bundleId, path }); }; export default commands;