Closed Frezyx closed 3 years ago
I was having the same issue as yours by not finding the Widget from its value key. You can solve by finding its type:
final SerializableFinder _authButton = find.byType('GradientButton');
Another way (currently I use) is by means of Page Object Model:
await _driver.runUnsynchronized(() async {
await _driver.tap(_authButton);
});
However, I don't how if find.byType('GradientButton');
will work if you have multiple buttons with the same type on the same view.
Thanks a lot for your response ! This helped in finding the element. But there are several of them on the screen, and Flutter responds with this error if on screen are more than one elements of this type.
Is there any other way to find it ?
@Frezyx another solution is to try with text search (I am not sure it will click the button):
final SerializableFinder _authButton = find.text('Login');
Did you try this with a find by value-key?
await _driver.runUnsynchronized(() async {
await _driver.tap(_authButton);
});
Unfortunately I've already tried it. Not working with my button :cry: In any case, thank you for answering and suggesting a solution :blush: :thumbsup:
Hello. I use the GradientButton from your package. And action of it is callback function. I write integration test for my application. How can i test it like a tap() on RaisedButton ?