Chapter 4: Can't find static text with display identifier

I’m getting a failed to get matching snapshot for the display text. I’m using .accessibilityIdentifier(“display”) for the Text, as the .accessibility(identifier:) function is deprecated.

Don’t really know how to debug this ?
Screen Shot 2021-11-09 at 8.06.19 PMScreen Shot 2021-11-09 at 8.09.27 PM

@joseines I changed .accessibility(identifier:) to .accessibilityIdentifier(“display”) and I’m not seeing the same error that you did. Can you check the final version for the chapter, make the change there as see if you still see the problem?

Also, the fourth edition came out today and you might want to download the code for it. It doesn’t address this change, and that will be shown in a future update.

Appreciate it, checked the final version and realized my mistake. I was only adding the identifier in one place instead of two.


  • Jose.