How can we add the Accessibility Identifier to NaviagationTitle Text. I know for buttons/text/Image/stack views we can use “.accessibility(identifier: “some_identifier”)”.
unable to add the modifier to .navigationBarTitle(Text(“title”), displayMode: .inline). Accessibility Identifier's are required for XCUI automation testing.
Code Block struct SuccessfulSignInView: View { var body: some View { VStack { Text("Title Text") .accessibility(identifier: "title") } .navigationTitle("title") //How to add accessibilityIdentifier to Navigation bar title? //.navigationTitle(Text("title").accessibility(identifier: "title")) } }
unable to add the modifier to .navigationBarTitle(Text(“title”), displayMode: .inline). Accessibility Identifier's are required for XCUI automation testing.