Skip to content

Commit 49b8e59

Browse files
fix(device-controller):set platformName toLowerCase() (#98)
1 parent 51446b1 commit 49b8e59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/device-controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ export class DeviceManger implements IDeviceManager {
2828
}
2929

3030
public async startDevice(args: INsCapabilities): Promise<IDevice> {
31+
args.appiumCaps.platformName = args.appiumCaps.platformName.toLowerCase();
3132
let device: IDevice = DeviceManger.getDefaultDevice(args);
3233
if (process.env["DEVICE_TOKEN"]) {
3334
device.token = process.env["DEVICE_TOKEN"];
34-
const allDevices = await DeviceController.getDevices({ platform: args.appiumCaps.platformName });
35+
const allDevices = await DeviceController.getDevices({ platform: device.platform });
3536
const foundDevice = DeviceController.filter(allDevices, { token: device.token.replace("emulator-", "") })[0];
3637
console.log("Device: ", foundDevice);
3738
return foundDevice;

0 commit comments

Comments
 (0)