| || |
SQASetProperty - Cannot get value to persist
I have the following in a script:
ComboBox Click, "Name=fromDay", ""
Result = SQASetProperty("Type=ComboListBox;Name=fromDay","v alue",CDay)
When I set a breakpoint at this line and inspect the web page the value in the list has been set successfuly.
However, when I let the script continue to the next line the value is lost.
Does anybody know why it does not persist and how I can get it to persis?
Re: SQASetProperty - Cannot get value to persist
I've had similar trouble with checkboxes in an application I was testing - what I wanted to do was
-use SQAGetProperty to read the "checked/unchecked" state
-compare this with the state I needed it to be in
-if they didn't match, use SQASetProperty to change the property value to what I wanted
but I couldn't get it to work - it read the value fine but if I needed to set a new value it wouldn't take. There was no error, it just didn't change the state the way I expected.
I'm sure my (old) SQA Basic reference has some warnings about limitations of SQASetProperty, and how some properties are best changed directly by script actions - which is what I did in the end - if the checkbox was in the wrong state then I got the script to actually click on it and then checked it had changed, so I didn't end up having to use SQASetProperty at all.