| || |
.NET SwfPropertyGrid object and Setting a value
In QTP 11 I'm having some difficulty working with a .NET SwfPropertyGrid object and setting the value for a particular property. The Input field is a Combobox type field (SwfEdit and SwfList, not a true SwfComboBox), and does not work well with the .SetValue method.
I get either a "Invalid cast from "System.String" message for a list of items (like Chevy, Dodge, Ford) or "String was not recognized as a valid Boolean." for a binary list (Yes, No).
If the input is a straight out SwfEdit field (normal text input) the .SetValue works fine.
Has anyone else run into this and what was the trick to get it to behave.
Re: .NET SwfPropertyGrid object and Setting a value
I haven't run into this myself but a few avenues of investigation I would look into are:
Can you get access to the object through the SwfPropertyGrid ChildObjects method?
Can you get access to the control by using the SwfPropertyGrid("name").Object method - this may expose some extra .net functions you can use.
Can you get around it by clicking the grid cell and using sendkeys?