1- import { desiredCapConstraints } from './desiredCaps' ;
2- import { JWProxy , BaseDriver } from '@appium/base-driver' ;
1+ import { BaseDriver , JWProxy } from '@appium/base-driver' ;
32import type {
43 DefaultCreateSessionResult ,
4+ DriverCaps ,
55 DriverData ,
66 W3CDriverCaps ,
7- DriverCaps ,
87} from '@appium/types' ;
8+ import { desiredCapConstraints } from './desiredCaps' ;
99type FlutterDriverConstraints = typeof desiredCapConstraints ;
1010// @ts -ignore
11- import { XCUITestDriver } from 'appium-xcuitest-driver' ;
1211import { AndroidUiautomator2Driver } from 'appium-uiautomator2-driver' ;
12+ import { XCUITestDriver } from 'appium-xcuitest-driver' ;
1313// @ts -ignore
1414import { Mac2Driver } from 'appium-mac2-driver' ;
15- import { createSession as createSessionMixin } from './session' ;
15+ import { logger , util } from 'appium/support' ;
16+ import _ from 'lodash' ;
17+ import { androidPortForward , androidRemovePortForward } from './android' ;
1618import {
17- findElOrEls ,
19+ clear ,
1820 click ,
19- getText ,
21+ ELEMENT_CACHE ,
2022 elementDisplayed ,
21- getAttribute ,
2223 elementEnabled ,
23- setValue ,
24- clear ,
25- ELEMENT_CACHE ,
24+ findElOrEls ,
25+ getAttribute ,
2626 getElementRect ,
27+ getText ,
28+ setValue ,
2729 constructFindElementPayload ,
2830} from './commands/element' ;
31+ import { iosPortForward , iosRemovePortForward } from './iOS' ;
32+ import { createSession as createSessionMixin } from './session' ;
33+ import type { PortForwardCallback , PortReleaseCallback } from './types' ;
2934import {
3035 attachAppLaunchArguments ,
3136 fetchFlutterServerPort ,
@@ -34,11 +39,6 @@ import {
3439 isFlutterDriverCommand ,
3540 waitForFlutterServerToBeActive ,
3641} from './utils' ;
37- import { logger , util } from 'appium/support' ;
38- import { androidPortForward , androidRemovePortForward } from './android' ;
39- import { iosPortForward , iosRemovePortForward } from './iOS' ;
40- import type { PortForwardCallback , PortReleaseCallback } from './types' ;
41- import _ from 'lodash' ;
4242
4343import type { RouteMatcher } from '@appium/types' ;
4444
@@ -289,14 +289,16 @@ export class AppiumFlutterDriver extends BaseDriver<FlutterDriverConstraints> {
289289 caps ,
290290 ...JSON . parse ( JSON . stringify ( args ) ) ,
291291 ) ;
292+ console . info ( `proxydriver: ${ JSON . stringify ( this . proxydriver ) } ` ) ;
292293 const packageName =
293294 this . proxydriver instanceof AndroidUiautomator2Driver
294295 ? this . proxydriver . opts . appPackage !
295296 : this . proxydriver . opts . bundleId ! ;
296297
297298 const isIosSimulator =
298- this . proxydriver instanceof XCUITestDriver &&
299- ! this . proxydriver . isRealDevice ( ) ;
299+ ( this . proxydriver instanceof XCUITestDriver &&
300+ ! this . proxydriver . isRealDevice ( ) ) ||
301+ this . proxydriver instanceof Mac2Driver ;
300302
301303 const portcallbacks : {
302304 portForwardCallback ?: PortForwardCallback ;
0 commit comments