Closed baselalali closed 1 year ago
When you have an ability to switch between contexts within AppiumFlutterDriver, this may not be needed at all. I will update you about the implementation shortly.
Thank you! @5v1988 We need the following feature:
- deleteSession
- setContext
- getCurrentContext
- getContexts
- activateApp('appId')/mobile:activateApp
- mobile:activateApp has skipAttachObservatoryUrl key to not try to attach to an observatory url. e.g. driver.execute_script - 'mobile:activateApp', {skipAttachObservatoryUrl: true, appId: 'com.android.chrome'}
- terminateApp('appId')/mobile:terminateApp
- installApp(appPath, options)
- getClipboard
- setClipboard
Please let me know, when the feature has been updated/implemented
We can cover contexts related cases in coming days, but other stuffs may take a couple of weeks, however, feel free to create a PR if you want to contribute to this library @baselalali
Thank you @5v1988. The important thing we need to implement is casting from FlutterAppiumDriver
to AppiumDriver
, as some functions are only supported in the NativeDriver. This function would be a valuable addition.
I triefed to implement getContexts methods, but that is not work with me.
Hi @baselalali
- setContext
- getCurrentContext
- getContexts
- activateApp('appId')/mobile:activateApp
- mobile:activateApp has skipAttachObservatoryUrl key to not try to attach to an observatory url. e.g. driver.execute_script - 'mobile:activateApp', {skipAttachObservatoryUrl: true, appId: 'com.android.chrome'}
- terminateApp('appId')/mobile:terminateApp
- installApp(appPath, options)
- getClipboard
- setClipboard ```
most of these commands should work in NATIVE_APP context now, and if anything, doesn't work, please help to open an another issue for those separately. Thanks
I want to cast Appium Driver To AppiumFlutterDriver. I implemented this methodes:
I get the error:
Invocation of init method failed; nested exception is java.lang.ClassCastException: class io.appium.java_client.android.AndroidDriver cannot be cast to class io.qualityplus.flutter.driver.AppiumFlutterDriver (io.appium.java_client.android.AndroidDriver and io.qualityplus.flutter.driver.AppiumFlutterDriver are in unnamed module of loader 'app')