Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlutterElement is_enabled() method not implemented? #468

Closed
usilinsMea opened this issue May 19, 2023 · 3 comments
Closed

FlutterElement is_enabled() method not implemented? #468

usilinsMea opened this issue May 19, 2023 · 3 comments

Comments

@usilinsMea
Copy link

Environment
Appium server - v2.0.0-beta.66
Appium flutter driver - [email protected]
Python 3.11.3

Driver capabilities
capabilities = { "platformName": "Android", "automationName": "Flutter", "app": "/some/path/file.apk" }

Description
We are using appium flutter driver to automate our Android mobile application. We are able to successfully find elements, click them, input text, etc. A need to check weather or not an element is enabled arose. We saw that Python appium-flutter-finder lib has the option to call is_enabled() for a FlutterElement . When calling this method, we get the following error
tacktrace: NotYetImplementedError: Method has not yet been implemented at FlutterDriver.executeCommand (/usr/local/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/driver.ts:100:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) ...
Appium server log:
[HTTP] --> GET /session/6ce015d4-7c94-45d1-a175-baa91aeb897d/element/eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoiZW1haWwiLCJrZXlWYWx1ZVR5cGUiOiJTdHJpbmcifQ==/enabled [HTTP] {} [debug] [FlutterDriver@61a8 (6ce015d4)] Calling AppiumDriver.elementEnabled() with args: ["eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoiZW1haWwiLCJrZXlWYWx1ZVR5cGUiOiJTdHJpbmcifQ==","6ce015d4-7c94-45d1-a175-baa91aeb897d"] [debug] [FlutterDriver] Executing Flutter driver command 'elementEnabled' [debug] [FlutterDriver@61a8 (6ce015d4)] Encountered internal error running command: NotYetImplementedError: Method has not yet been implemented [debug] [FlutterDriver@61a8 (6ce015d4)] at FlutterDriver.executeCommand (/usr/local/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/driver.ts:100:13) [debug] [FlutterDriver@61a8 (6ce015d4)] at processTicksAndRejections (node:internal/process/task_queues:95:5) [debug] [FlutterDriver@61a8 (6ce015d4)] at FlutterDriver.executeCommand (/Users/usilins/.appium/node_modules/appium-flutter-driver/lib/driver.ts:167:16) [debug] [FlutterDriver@61a8 (6ce015d4)] at defaultBehavior (/usr/local/lib/node_modules/appium/lib/appium.js:684:14) [debug] [FlutterDriver@61a8 (6ce015d4)] at AppiumDriver.executeWrappedCommand (/usr/local/lib/node_modules/appium/lib/appium.js:774:16) [debug] [FlutterDriver@61a8 (6ce015d4)] at AppiumDriver.executeCommand (/usr/local/lib/node_modules/appium/lib/appium.js:696:17) [debug] [FlutterDriver@61a8 (6ce015d4)] at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:387:19) [HTTP] <-- GET /session/6ce015d4-7c94-45d1-a175-baa91aeb897d/element/eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoiZW1haWwiLCJrZXlWYWx1ZVR5cGUiOiJTdHJpbmcifQ==/enabled 405 25 ms - 891
Is this method not yet implemented? Or are we doing something wrong?

@KazuCocoa
Copy link
Member

As this repository's readme, this driver depends on https://api.flutter.dev/flutter/flutter_driver/flutter_driver-library.html , so if the enabled method is available in the library, we can add it. (But afaik, not exist)

@usilinsMea
Copy link
Author

@KazuCocoa thanks for the answer. We are kind of stuck, perhaps you can point out a way how we could read properties for a set widget? Or perhaps check if a specific widget is disabled/enabled?

@KazuCocoa
Copy link
Member

#703 could be a workaround as this driver for this kind of behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants