| || |
How to clear data from a swfSpin control?
I have a data-driven test that enters a value into an swfSpin control, takes the focus off of the spin control to see the resulting value in the control (example: an input of .5 results in 1 when the focus is removed from the tool, verifies this actual value vs. expected result, and then moves onto the next data value.
The problem is that QTP does not remove the previous value in the control. So if one test enters a "3", and the next enters a "5", the control keeps the original 3 and adds the 5 in the control.
I need to be able to clear the previous contents of the spin control before the next test data value is entered.
I have tried using empty values in a data table, using methods such as Clear (doesn't work with this control), settings TO properties to null, but nothing is working. I can't seem to find anything about this when using George Bush's THE GOOGLE, or in this fine forum.
There is probably a simple solution, I just can't seem to figure it out or find it. Can someone provide some guidance? Thanks!
Re: How to clear data from a swfSpin control?
Well, here is the answer:
Set MyObj = swfWindow("name").swfSpin("name").Object