patrol icon indicating copy to clipboard operation
patrol copied to clipboard

iOS native `waitUntilVisible` can't find next instances

Open fylyppo opened this issue 1 year ago • 1 comments

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)
<asynchronous suspension>
#1      NativeAutomator.waitUntilVisible (package:patrol/src/native/native_automator.dart:693:5)
<asynchronous suspension>
#2      main.<anonymous closure> (file:///Users/fylyppo/Documents/GitHub/patrol/dev/e2e_app/integration_test/crash_test.dart:11:7)
<asynchronous suspension>
#3      patrolTest.<anonymous closure> (package:patrol/src/common.dart:130:7)
<asynchronous suspension>
#4      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:168:15)
<asynchronous suspension>
#5      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1013:5)
<asynchronous suspension>
#6      TestWidgetsFlutterBinding._createTestCompletionHandler.<anonymous closure> (package:flutter_test/src/binding.dart:804:12)
<asynchronous suspension>

Patrol version

from branch

Patrol Doctor output

Patrol Doctor output
<!-- Replace this line with your logs. Do not remove the backticks! -->

Flutter Doctor output

Flutter Doctor output
<!-- Replace this line with your logs. Do not remove the backticks! -->

fylyppo avatar Jan 30 '24 16:01 fylyppo

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

jBorkowska avatar Feb 01 '24 14:02 jBorkowska