Property to set Text on Control with Object Type NumberInput
I am working on mobile testing on virtual browser on Chrome.
In my application there is a text box which is identified by Test Complete as ObjectType:NumberInput. I want to set some value in NumberInput by deleting the existing value.
the .Keys method appends the value in the box.
Please help me with some relevant answers.
Thanks in advance.
Send the control this:
... before sending your normal .keys to it. The [Esc] sends an escape keypress to the control which clears it. I've tried it and it works for me.
Or just add [Esc] to the start of the string you are already sending it which will clear it then enter your text. Again, tried and working for me.
I tried using Esc but still it does not clear the text, it still appends the text in the NumberInput box.
Please help me with some other solution.
I should be - [Esc] - without the square brackets, it won't work.
I tried it on a NumberInput type field and it worked perfectly.
Try it manually. Enter some numbers into the box and press escape. If the field clears, then send it an [Esc] should work.