Hi,
I need to automate over a Flex application (swf), and I have several problems related on firing events on several objects.
For example, in the appliction, there are two combos: "country" and "city". The first combo is enabled, and the second is disabled. When I manually select a value for "country", the second combo "city" gets enabled.
When I automate in UFT 12.0, I identify and select value for the first combo "country":
The combo set the value "Spain" but doesn't fire the event that enables the second combo "city".
This problem occurs in other components (for example, FlexCalendar, FlexButton, ...)
I have looked for this, but I can't get a solution. I cannot use FireEvent method because this method is not supported for these components. Also I tried to use Setting.WebPackage("ReplayType"), but also it cannot solve this.
Please if someone knows how to resolve this problem, I'll be gratefull.
Regards.
I forgot to say I also tried a "tip" based on simulate with keyboard, with up arrow and down arrow so I get the method fired and the second combo "city" gets enabled:
And it works in some cases, but I think this method is a botched job, and not always works.
Regards.
I need to automate over a Flex application (swf), and I have several problems related on firing events on several objects.
For example, in the appliction, there are two combos: "country" and "city". The first combo is enabled, and the second is disabled. When I manually select a value for "country", the second combo "city" gets enabled.
When I automate in UFT 12.0, I identify and select value for the first combo "country":
Code:
.FlexComboBox("...").Select "Spain"
The combo set the value "Spain" but doesn't fire the event that enables the second combo "city".
This problem occurs in other components (for example, FlexCalendar, FlexButton, ...)
I have looked for this, but I can't get a solution. I cannot use FireEvent method because this method is not supported for these components. Also I tried to use Setting.WebPackage("ReplayType"), but also it cannot solve this.
Please if someone knows how to resolve this problem, I'll be gratefull.
Regards.
I forgot to say I also tried a "tip" based on simulate with keyboard, with up arrow and down arrow so I get the method fired and the second combo "city" gets enabled:
Code:
'First I select the value
.FlexComboBox("...").Select "Spain"
'Now I set focus on the first combo
.FlexComboBox("...").Click
'Now I achive firing the event and enable the second combo simulating up arrow and down arrow
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{DOWN}"
WshShell.SendKeys "{UP}"
And it works in some cases, but I think this method is a botched job, and not always works.
Regards.