I have an EditText field it has an android:gravity=“center” attribute and a default value of “https://”.
When I try to clear this textfield:As I see the Appium clicks into the textfield and checks if it has any characters on the left and if has it removes those. Then clicks again and checks again then delete and so on. On the last time it clicks in it findes no character on the left so the textfield is empty for the Appium. At this point there is still a “/” left so my test fails because I couldn’t write the expected URL into the field.
I’m familiar with the system. Log won’t provide any further information and the server version is in the title: 1.2.4.1. I’m thinking about to change the way how webelement.clear() works. My solution would be clicking on the very end of the textfield and then try to clear / delete the content of it.
My bad, I didn’t notice it
The solution you are saying looks promising, i tried it myself when the clear method had problems before in the previous release.
Yes, by default I mean android:text=‘https://’.
I cannot provide any log right now, but I can describe what I’ve seen:
(Showing of tap and position of the cursor is enabled on the device)
The test case is to send empty URL to the server.
During the test it’s been clicked into the textview it was on the left side but it jumped into the middle of the view and deleted the “http”, then tried again and delted the " : ", then the “/” and there was one “/” left but then the cursor was on the left side of the last “/” and the form’s been sent and returned with wrong error message (“Malformated URL” instead of “Empty URL”) every single time and it’s been right since I could see the “/” left on the screen. Because of this failure the next test case (wich was the correct URL) failed, too.