leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
851 stars 126 forks source link

iOS native `waitUntilVisible` can't find next instances #2079

Open fylyppo opened 7 months ago

fylyppo commented 7 months ago

Steps to reproduce

  1. Clone https://github.com/leancodepl/patrol.git and checkout to bug/ios-reproduce-examples
  2. run iOS simulator, open safari and search "google" to see multiple "Google" words on the screen
  3. in patrol/dev/e2e_app run: patrol test -t integration_test/ios_wait_until_visible_test.dart

Actual results

Patrol can't find second instance of "Google" text

Logs

Logs ``` ((passed) is true) failed - ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════ The following PatrolActionException was thrown running a test: Patrol action failed: NativeAutomatorClientException: waitUntilVisible() failed with Invalid response: 400 The operation couldn’t be completed. (patrol.PatrolError error 0.) When the exception was thrown, this was the stack: #0 NativeAutomator._wrapRequest (package:patrol/src/native/native_automator.dart:226:7) #1 NativeAutomator.waitUntilVisible (package:patrol/src/native/native_automator.dart:693:5) #2 main. (file:///Users/fylyppo/Documents/GitHub/patrol/dev/e2e_app/integration_test/crash_test.dart:11:7) #3 patrolTest. (package:patrol/src/common.dart:130:7) #4 testWidgets.. (package:flutter_test/src/widget_tester.dart:168:15) #5 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1013:5) #6 TestWidgetsFlutterBinding._createTestCompletionHandler. (package:flutter_test/src/binding.dart:804:12) ```

Patrol version

from branch

Patrol Doctor output

Patrol Doctor output ``` ```

Flutter Doctor output

Flutter Doctor output ``` ```
jBorkowska commented 7 months ago

It is not implemented, the argument is ignored. We should add it