Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ export class NovaWindowsDriver extends BaseDriver<NovaWindowsDriverConstraints,
this.locatorStrategies = [...LOCATION_STRATEGIES];
this.desiredCapConstraints = UI_AUTOMATION_DRIVER_CONSTRAINTS;

// Bind commands to this instance (not prototype) so each driver instance uses its own
// PowerShell session and state when multiple sessions exist
for (const key in commands) { // TODO: create a decorator that will do that for the class
NovaWindowsDriver.prototype[key] = commands[key].bind(this);
(this as any)[key] = commands[key].bind(this);
}
}

Expand Down