To automate Flex Web Application

179 views
Skip to first unread message

thameemterror

unread,
Jan 8, 2015, 8:33:45 PM1/8/15
to sfap...@googlegroups.com
Hi Guys,

  Can we able to automate Flex Web applications using sfapi?

Thanks,
Thameem.

Igor Khrol

unread,
Jan 9, 2015, 2:59:45 AM1/9/15
to sfap...@googlegroups.com
Yes.

С уважением,
Игорь.

--

---
You received this message because you are subscribed to the Google Groups "Selenium-Flex API - Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sfapi-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

thameem0036

unread,
Jan 12, 2015, 6:16:11 PM1/12/15
to sfap...@googlegroups.com
Hi Igor,
   
   Thanks for your response. Actually I need to automate Vmware Vsphere Webclient. Vmware guys were ready to give special build with automation support. Also we had our plugin integrated with the Vsphere webclient which also need to be automated.
I can able to compile our VC plugin with sfapi.swc but am not sure Vmware guys will do the same. Can you please guide me how to go ahead with this automation.

Many Thanks,
Thameem

Igor Khrol

unread,
Jan 13, 2015, 1:44:41 AM1/13/15
to sfap...@googlegroups.com
After compilation with sfapi.swc your flex-object exposes API which is accessible from JavaScript. So you can launch browser using WebDriver and access that API through JavaScript.
Most likely you'll need to go though flex source code in order to understand what's going on.

For my project some years ago additional tuning and configuration was required. For the latest Flex and Browser versions I don't really know the actual steps.

Regards,
Igor.

thameem0036

unread,
Jan 14, 2015, 6:55:15 PM1/14/15
to sfap...@googlegroups.com
Thank you so much for your response Igor,

 I just went for a trial automation with the sample selben project. It got automated perfectly. But I am wondering that how to find the flex elements in the page so that I need to automate my flex page. Do we have a way to find the flex elements similarly like we can inspect web page through xpath navigation and also through Selenium IDE?

Many Thanks,
Thameem

thameem0036

unread,
Jan 14, 2015, 6:55:43 PM1/14/15
to sfap...@googlegroups.com
Thank you so much for your response Igor,

 I just went for a trial automation with the sample selben project. It got automated perfectly. But I am wondering that how to find the flex elements in the page so that I need to automate my flex page. Do we have a way to find the flex elements similarly like we can inspect web page through xpath navigation and also through Selenium IDE?

Many Thanks,
Thameem

Igor Khrol

unread,
Jan 15, 2015, 1:38:26 AM1/15/15
to sfap...@googlegroups.com
https://code.google.com/p/fxspy/ - add this library to your Flex component. It allows you to do it.
Another way - debug version flash player with FlashInspector https://addons.mozilla.org/ru/firefox/addon/flashinspector-194381/.

С уважением,
Игорь.

thameem0036

unread,
Jan 15, 2015, 4:41:41 PM1/15/15
to sfap...@googlegroups.com
Well thanks Igor,

   I would like to go with Flash Inspector. I inspected the compiled selben.html page with the flash inspector. But I am not able to see the IDs of each component we have used in that application. I can see other properties, can you just guide me how to use that tool to get the flex component IDs and other related properties which are necessary to automate?

Many Thanks,
Thameem

Igor Khrol

unread,
Jan 16, 2015, 4:05:16 AM1/16/15
to sfap...@googlegroups.com
Maybe there is no IDs defined on the components you need? That's why you can't see them.

Regards,
Igor.

thameem0036

unread,
Jan 16, 2015, 7:36:48 PM1/16/15
to sfap...@googlegroups.com
But while I am going through Test App code, they have used IDs to write automation codes. I don't know how they are getting those ID using inspection tools. Please let me know your thoughts on this.

thameem0036

unread,
Jan 26, 2015, 8:34:34 PM1/26/15
to sfap...@googlegroups.com
Hi Ighor,

 I got a special build from vmware team compiled with sfapi.swc. As in case of sfapi we need run under a webserver(apache tomcat), for the page to get automated. In case of Vshpere web client they are using Virgo server. Kindly let me know the steps of how to proceed automation using vmware-sfapi build. Waiting for your response.

Many Thanks,
Thameem

Igor Khrol

unread,
Jan 27, 2015, 3:43:01 AM1/27/15
to sfap...@googlegroups.com
You should open your page and call proper methods from you Flex-object using JavaScript: that's general idea.

Regards,
Igor.

thameem0036

unread,
Jan 27, 2015, 8:03:12 PM1/27/15
to sfap...@googlegroups.com
Thanks for your info Ighor,

I can able to automate vsphere webclient using sfapi. But I had some questions on how to do click operations using locators(ex. container[@automationname='Password:']/text[@automationname='passwordTextInput']) as i was able to automate only using ids.
And also still am unable to find the elements using any inspectors fo which I am using some third party trial builds to get the ids of the flex components currently. Please help me out in this case.

Many Thanks,
Thameem

thameem0036

unread,
Jan 29, 2015, 1:43:46 PM1/29/15
to sfap...@googlegroups.com
Hi Ighor,

Waiting for your response.

Many Thanks,
Thameem

thameem0036

unread,
Jan 29, 2015, 7:15:31 PM1/29/15
to sfap...@googlegroups.com
Hi Ighor,

I got the solution that we have to pass path like "container_app.doFlexClick('container:id=formItemLoginButton/button:id=loginButton','') for getting the element clicked. But I have another question that, is sfapi supports only "id" element for automation? I was trying to automate using name and other elements like "container_app.doFlexClick('menuitem:text=Logout','')", but its showing error. Can you please help out in this case?

Many Thanks,
Thameem

Igor Khrol

unread,
Jan 30, 2015, 12:31:13 AM1/30/15
to sfap...@googlegroups.com
It was long time ago - I don't remember all the details. But we did some modifications in library to support all this hierarchies and text. http://www.slideshare.net/khroliz/flex-selenium-rc - slide 21. Here you can see how we used locators (don't read Russian text).

thameem0036

unread,
Feb 26, 2015, 2:24:04 PM2/26/15
to sfap...@googlegroups.com
Hi Ighor,

   With help of sfapi, I am able to automate to most of the components, but while trying to check a check box or selecting a radio button, which is of a spark component,it wasn't get automated showing below issue,

Operation Made: container_app.doFlexRadioButton('newVolumeCollectionRadio','')

Error Shown: The Element 'newVolumeCollectionRadio' is not of type 'mx.controls::RadioButton'

After looking into the source code of sfapi, I came to know from the below code snippet, that there is a restriction to automate in case of spark component. Can't we able to use sfapi for automating spark components? Can we customize the code by adding spark support and thereby requesting vmware guys to compile the swf and get the modified build?
Kindly let me know your suggestion on this. It will be very helpful for my automation to proceed further

Code Snippet:
public function doFlexRadioButton(id:String, args:String):String
{
var child:Object = appTreeParser.getElement(id);
if(Tools.getOjectType(child) != ReferenceData.RADIOBUTTON_DESCRIPTION)
{
return ErrorMessages.getError(ErrorMessages.ERROR_TYPE_MISMATCH, [id, ReferenceData.RADIOBUTTON_DESCRIPTION]);
}
Reply all
Reply to author
Forward
0 new messages