Open rohitbhoite opened 2 months ago
Please share full server logs pls
One more observation is If I generate a build for testing using command flutter run apk --debug --flavor dev -t integration_test/appium_test.dart
and If I try to add any text manually in textfield, it does not allow me to type any text. Is this expected?
Also tried setting text using appium inspector send Keys function and it did not work either.
@saikrishna321 Is there any other way to implement this?
@rohitbhoite can you share sample apk?
@rohitbhoite Can you push the sample code to github repo. Can't download from unknown source.
Can you try with above main.dart file .Its just a single file. Have added code in the description section
I am using ./gradlew app:assembleDebug -Ptarget=
pwd/../integration_test/appium_test.dart
to generate the build
Thank you for your prompt response :)
@saikrishna321 did you get a chance to check it
@rohitbhoite I'm unable to reproduce this issue. Everything works fine
it.only('Issue test', async () => {
await performLogin();
await openScreen('Issue');
await browser
.flutterByValueKey$('editText').addValue("I'm typing in the text field");
})
Logs: https://gist.github.com/saikrishna321/e2ff4f339a96a42676fbacab4c617864#file-flutter-issue-L354-L363
@saikrishna321 I'm experiencing the exact same issue. My app initialized from the appium.dart is not allowing me to send keys. It is correctly identifying the element, it can even clear the element but not send keys.
Like mentioned above, I cannot add keys manually either, the keyboard is not displayed and a dart like pointer is instead.
This must be related how the app is being initialized, am I missing something? Some configuration, pluggin? My app is from a multiprovider, however I tried a very simple code and the exact same thing happened?
void main() {
initializeTest(app: const TextFieldExampleApp());
}
class TextFieldExampleApp extends StatelessWidget {
const TextFieldExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Obscured Textfield')),
body: const Center(
child: ObscuredTextFieldSample(),
),
),
);
}
}
class ObscuredTextFieldSample extends StatelessWidget {
const ObscuredTextFieldSample({super.key});
@override
Widget build(BuildContext context) {
return const SizedBox(
width: 250,
child: TextField(
key: ValueKey("email_input"),
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Password',
),
),
);
}
}
Thanks for sharing a sample code snippet. Will get back.
@saikrishna321 any updates on this?
@lmendes21 Sorry was snowed with work. Will see this soon. Thanks.
I am having below widget in one form and using flutter-integration@1.1.3 driver
I am trying to set the text using below code but its not working. I also tried using sendKeys method but its not working as well.
await browser.flutterByValueKey$("editText").addValue("a");
Got below error:
Have checked below code as well but somehow its not working https://github.com/AppiumTestDistribution/appium-flutter-integration-driver/blob/main/test/specs/test.e2e.js
Logs
Code: appium_test.dart file
main.dart file