2

As a counter example, when setting breakpoint on KIF action, it only stops on the adding action to dispatching queue process, which is quite not as expected.

My question is, can we actually break on the real EarlGrey action instead of adding the action for later execution? That would be much easier for debugging. Thanks.

gran_profaci
  • 8,087
  • 15
  • 66
  • 99
Zheng Xu
  • 101
  • 6

1 Answers1

1

You can definitely set breakpoints for EarlGrey right within your test code. When you add a breakpoint on a specific line in your test - the breakpoint is hit before that particular test interaction is done, but only after all other UI interactions taking place in the test (GREYConditions, tracked animations, network requests etc.) are completed.

For eg - Sample EG Test

Here, the condition for the stepper will have to be executed first and then the breakpoint is hit, followed by the tap on the key window.

gran_profaci
  • 8,087
  • 15
  • 66
  • 99