Post

Replies

Boosts

Views

Activity

Reply to XCUITest - How do I type into a secure text field? (password)
I recently ran into this issue that I had to solve in a different way. I tried disabling the hardware keyboard, but that didn't help. It turned out that I had a hidden TextField right next to the SecureTextField that was somehow interfering with the click. The text field was hidden using the code below. I didn't get too far into debugging to understand why this may have caused issues, but I was able to work around it by hiding the field using a conditional. I hope this is helpful to anyone who runs into this issue in the future! extension View {     func hidden(_ isHidden: Bool) -> some View {         ModifiedContent(content: self, modifier: Show(hidden: isHidden))     } } struct Show: ViewModifier {     let hidden: Bool     @ViewBuilder     func body(content: Content) -> some View {         if hidden {             content.hidden()         } else {             content         }     } }
Jan ’22