ashwithpoojary98 / javaflutterfinder

Flutter driver with Java implementation
MIT License
10 stars 5 forks source link

Uncaught extension error while executing get_text #585 #12

Open baselalali opened 9 months ago

baselalali commented 9 months ago

Background:

I am working on a Flutter application and using Flutter Driver for automated testing. In my test script, I'm attempting to retrieve the text of an element with the value key "imprint_link."

Expected Behavior:

I expect to be able to retrieve the text of the element with the value key "imprint_link" using the getText() method.

Current Behavior:

When I try to get the text of the element using fnd.byValueKey("imprint_link").getText(), I encounter the following error:

image

{
  "isError": true,
  "response": "Uncaught extension error while executing get_text: Unsupported operation: Type Text is currently not supported by getText\n#0 CommandHandlerFactory._getText (package:flutter_driver/src/common/handler_factory.dart:422:7)\n<asynchronous suspension>\n#1 FlutterDriverExtension.call (package:flutter_driver/src/extension/extension.dart:376:31)\n<asynchronous suspension>\n#2 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:936:18)\n<asynchronous suspension>\n",
  "type": "_extensionType",
  "method": "ext.flutter.driver"
}

`[Appium]   - xcuitest@4.35.0 (automationName 'XCUITest')
[Appium]   - uiautomator2@2.29.8 (automationName 'UiAutomator2')
[Appium]   - flutter@1.23.0 (automationName 'Flutter')`

       <dependency>
            <groupId>io.github.ashwithpoojary98</groupId>
            <artifactId>appium_flutterfinder_java</artifactId>
            <version>1.0.3</version>
        </dependency>
ashwithpoojary98 commented 8 months ago

@baselalali getText() as of now only works for Text widget