Property to set Text on Control with Object Type NumberInput
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2014
06:24 PM
06-16-2014
06:24 PM
Property to set Text on Control with Object Type NumberInput
Hi Team,
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.
Regards,
Nachi
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.
Regards,
Nachi
5 REPLIES 5
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2014
11:57 PM
06-16-2014
11:57 PM
Try using .value instead of .keys?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014
12:42 AM
06-17-2014
12:42 AM
.Value is not working for that control
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014
01:36 AM
06-17-2014
01:36 AM
You're right. It doesn't.
Send the control this:
Send the control this:
.keys("[Esc]")
... 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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014
02:23 AM
06-17-2014
02:23 AM
Hi,
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.
Regards,
nachiket
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.
Regards,
nachiket
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014
03:07 AM
06-17-2014
03:07 AM
Did you format it correctly?
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.
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.
