mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-11-30 08:59:59 +00:00
feat(android): fix custom adb path no effect
This commit is contained in:
parent
2b502df712
commit
f3cc70fdb8
@ -52,13 +52,15 @@ export class AndroidDevice implements AndroidDevicePage {
|
||||
try {
|
||||
const androidAdbPath = getAIConfig(MIDSCENE_ADB_PATH);
|
||||
|
||||
this.adb = await ADB.createADB({
|
||||
// If `androidAdbPath` exists, use `newADB()`
|
||||
this.adb = androidAdbPath ? this.adb = await new ADB({
|
||||
udid: this.deviceId,
|
||||
adbExecTimeout: 60000,
|
||||
executable: androidAdbPath
|
||||
? { path: androidAdbPath, defaultArgs: [] }
|
||||
: undefined,
|
||||
});
|
||||
executable: { path: androidAdbPath, defaultArgs: [] }
|
||||
}) : await ADB.createADB({
|
||||
udid: this.deviceId,
|
||||
adbExecTimeout: 60000,
|
||||
})
|
||||
|
||||
const size = await this.getScreenSize();
|
||||
console.log(`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user