Hey guys,
I have a sample Flex application, that has an mx:TextInput with the "maxChars" property defined to 10. When I try to use GetPropertyValue, it keeps returning "null".
I also tried changing the element to a spark component (s:TextInput) and still happens the same thing...
Any idea why?
I've attached the snapshot, if it helps... The element is "TextInput".
Best regards,
Mourasman
"GetPropertyValue" doesn't always work (for me)
"GetPropertyValue" doesn't always work (for me)
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: "GetPropertyValue" doesn't always work (for me)
Hi,
I used following code to get the maxChar attribute and it works as expected.
In the future Ranorex will support Dynamic Capabilities, then this property will shown up in Spy beside many others.
Regards,
Peter
Ranorex Team
I used following code to get the maxChar attribute and it works as expected.
FlexElement textTextInput = "/dom[@page='GetPropTest.html']/body/flexobject/text[@type='TextInput']"; WinForms.MessageBox.Show(textTextInput.GetPropertyValue("maxChars"));Would it be possible to post me your code and maybe we can access your application?
In the future Ranorex will support Dynamic Capabilities, then this property will shown up in Spy beside many others.

Regards,
Peter
Ranorex Team
Re: "GetPropertyValue" doesn't always work (for me)
Hello,
Thanks for your reply!
The code is this simple. Nothing fancy here, I'm just testing this method.
My application is attached. It's just an .html with a bunch of .swf files.
EDIT: .mxml added, just in case.
Best regards,
Mourasman
Thanks for your reply!
The code is this simple. Nothing fancy here, I'm just testing this method.
My application is attached. It's just an .html with a bunch of .swf files.
EDIT: .mxml added, just in case.
Best regards,
Mourasman
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: "GetPropertyValue" doesn't always work (for me)
Hi,
Thanks and regards,
Peter
Ranorex Team
I cannot find the mxml file. Please could you post this file, because i need this to validate your code and take a look to the property you trying to get with Ranorex.Mourasman wrote:EDIT: .mxml added, just in case.
Thanks and regards,
Peter
Ranorex Team
Re: "GetPropertyValue" doesn't always work (for me)
Hey there!
It appears the forum doesn't support uploading .mxml files so I renamed the extension to .txt. That's why I didn't see the file wasn't uploaded. Be sure to change it back
Best regards,
Mourasman
It appears the forum doesn't support uploading .mxml files so I renamed the extension to .txt. That's why I didn't see the file wasn't uploaded. Be sure to change it back

Best regards,
Mourasman
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: "GetPropertyValue" doesn't always work (for me)
Hi,
Thank you for the mxml file. I tried your sample and Ranorex was able to retrieve the maxChars property. I used following code
Regards,
Peter
Ranorex Team
Thank you for the mxml file. I tried your sample and Ranorex was able to retrieve the maxChars property. I used following code
FlexElement testGetProp = "/dom[@page='GetPropTest.html']/body/flexobject/container/text[@id='testTextBox']"; var test = testGetProp.GetPropertyValue("maxChars");Please try the posted code and adapt the RxPath to your input field.
Regards,
Peter
Ranorex Team