Hi All, I am automating an android app and there is a email verification page where you have to enter a PIN. I use WebdriverIO with appium and typescript and when I try to enter a code using the setValue or addValue method in that field I get the error “invalid element state: Cannot set the element to ‘H’. Did you interact with the correct element?”
Then I tried to enter the code using the Appium inspector and I got the same error as shown in the image below. Can Someone tell me what I’m doing wrong or is there another way to handle this type of pages
Could it be that the field only accepts numeric input so entering letters produces an error? I believe I’ve seen that error before when I try to send a string to a numeric only field.
I tried adding the capabilities mentioned and tried running, have the same issue still. From what I found the action class mentioned in this answer is valid only for Java and doesn’t have an equivalent for webdriverio typescript which I use
After much desperation, I have used the following performactions method to type the values from the keyboard without specifying the field and it’s working. Please let me know whether there are any alternatives or if this approach is bad practice