How to get the properties of the controls

171 views
Skip to first unread message

Roopesh Nema

unread,
Sep 28, 2010, 3:01:21 AM9/28/10
to Selenium-Flex API - Support
Hi All ,

I am automating a flex application. I am able to get the id's of the controls for example in the form able to get the id of the field also this object has some properties like id,classname,automationName,errorString.

So could you please tell me how can I access these properties of the control. Actually I have to verify that given form field is "mandatory" or not so I thought , if any how I am able to access these properties then I can take the value of "errorString" , if it is set then this field is "mandatory" ????

Thanks in advance

Regards
Roopesh

Fergal Hanley

unread,
Sep 28, 2010, 3:58:21 AM9/28/10
to sfapi-...@googlegroups.com
If using the selenium IDE you can use an assertion to check the value of a property with, for example:

command: assertFlexProperty
target: myButton.errorString
value: This is an error msg

Good luck
Fergal

Roopesh Nema

unread,
Sep 28, 2010, 8:57:32 AM9/28/10
to sfapi-...@googlegroups.com
Thanks for your reply Fergal .

I am not using the IDE.
I am using a function "TGetProperty", but not getting any return value .

TGetProperty("poolName","errorString");

Here poolName is the control id and errorString is the property.

Regards
Roopesh

Fergal Hanley

unread,
Sep 28, 2010, 7:52:23 PM9/28/10
to sfapi-...@googlegroups.com

TGetProperty is not supported by sfapi.

If you've compiled the sfapi.swc into your application you can use the sfapi supported method doFlexProperty('idOfControl.property', '') which is exposed on the external interface.

javasparkle

unread,
Oct 14, 2010, 11:14:36 PM10/14/10
to Selenium-Flex API - Support
How are you identifying the id property of the control?

Roopesh Nema

unread,
Oct 15, 2010, 12:15:18 PM10/15/10
to sfapi-...@googlegroups.com
I have compiled my application with "KapInspect.swc" file.
After compilation , launch the application and using hotkeys ( alt + ctrl + left mouse click ) I am launching the spy, that contains all the properties of the controls .

siddarth

unread,
Oct 16, 2010, 12:08:22 AM10/16/10
to Selenium-Flex API - Support
Compiling KapIT with application will work but once application goes
to production KapIT should be disable for security reason.
You con have second option ,where you compile your KapIT with wrapper
SWF file.

Roopesh Nema

unread,
Oct 16, 2010, 12:10:48 PM10/16/10
to sfapi-...@googlegroups.com
ya we are creating 2 builds, official build and Automation build.
So only Automation build is having flex-selenium.swc and KapIt.swc. and this build is created only for internal use , official build is not compiled with these.

javasparkle

unread,
Oct 17, 2010, 1:55:01 PM10/17/10
to Selenium-Flex API - Support
Roopesh., that's the ideal approach recommended to follow to ensure
that the production build do not contain any automation specific
libraries instrumented. Anyways., coming back to the original issue.,
if you are able to identify id of the component then the below method
should work for you:

getFlexProperty("id:poolName","errorString")

If it doesn't work., then please via KapIt confirm that you are able
to see the property "errorString" for component "id:poolName"?

Ankit Arora

unread,
Apr 2, 2014, 11:41:47 AM4/2/14
to sfapi-...@googlegroups.com
Hi Siddharth,

What kind of security threats might be there if I compile KapIT with my flex application? Can you please elaborate?

Appreciate your time !

Thanks,
Ankit
Reply all
Reply to author
Forward
0 new messages