Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Peter Nicolai Motzfeldt
RE: access to the controls through the captio [ reply ]  
2008-12-15 09:55
This is not possible at the moment. But the test should fail if the control does not exist.

By: Mario Ruiz
RE: access to the controls through the captio [ reply ]  
2008-12-15 09:50
What I need is to get the automationNames of the flex controls in order to verify if they exist or not before I use them.

By: Peter Nicolai Motzfeldt
RE: access to the controls through the captio [ reply ]  
2008-12-15 08:43
At the moment it is not possible to get all the controls. But what do you want to de with all the controls?

Or do you mean all the controls with the same name, like in a repeater? Becuase in the 0.0.4 version, FunFX will return all objects with the same id it finds in an array. So if you have 4 ComboBoxes with the id "cb". You can then ask for each element like this:
@ie.combo_box("cb")[0].click
@ie.combo_box("cb")[1].click

By: Mario Ruiz
RE: access to the controls through the captio [ reply ]  
2008-11-21 15:59
Is still not possible to get all the controls?

I mean with somethig like:
myFlex.combo_boxes.each {|myCB|}

or maybe for all objects:
myFlex.objects.each {|myOb|}

Thanks.

By: Mario Ruiz
RE: access to the controls through the captio [ reply ]  
2008-09-11 14:47
Thank you very much for your help and support.

By: Peter Nicolai Motzfeldt
RE: access to the controls through the captio [ reply ]  
2008-09-11 13:45
There are no such thing in FunFX at this time, but we are currently rewriting FunFX (take a look at http://github.com/peternic/funfx). And in this version a type of recording tool will follow, so maybe that can be used for your problem? Then you can get the command for doing the action you just recorded, and then you can put that into your test.

By: Mario Ruiz
RE: access to the controls through the captio [ reply ]  
2008-09-11 13:30
I mean something like you can do in watir:
browser.links #show all the links on the browser
browser.buttons #show the button names for all the buttons on the browser
browser.checkboxes #show all the checkbox names on the browser
...

I need something similar in FunFX because sometimes the objects are generated during the execution so I don't know the names.

I realized that we can access an object in FunFX using ie.object(name) instead of using ie.button(name) so I was thinking that maybe we can get all the objects through something like ie.objects



By: Peter Nicolai Motzfeldt
RE: access to the controls through the captio [ reply ]  
2008-09-11 13:12
Every display object that displays some kind of label. Like buttons, tabs in the tabnavigator etc.

I am not sure I understand what you mean by all the objects inside a flex object? Do you mean business logic objects or like with an repeater that has multiple children/objects?


By: Mario Ruiz
RE: access to the controls through the captio [ reply ]  
2008-09-11 12:17
Yeah it's working now... I don't know what was happening.
Which controls could I access through the caption?
And another thing (I wrote it on your blog), How can I get all the objects inside a flex object?
Something like:
@ie.objects.each {|myObject|
puts myObject.name
puts myObject.className
}
In this case in myObject I'll have the object but also could be good for me to have only the name and then access to the object:
@ie.object(myObject)

thanks a lot.

By: Peter Nicolai Motzfeldt
RE: access to the controls through the caption [ reply ]  
2008-09-11 12:07
Yes, this is supposed to work. Are you not able to click the button with that expression?

By: Mario Ruiz
access to the controls through the caption [ reply ]  
2008-09-11 12:01
I would like to access to a control through the caption instead of the id/name.
For example if I have something like:
<mx:Button id="btn01" label="Update data" click="UpdateIt.show()" />

I would like to do:
@ie.button("Update data").click

Is it possible??

Thanks.