In this post I will provide some files and instructions that will allow you to create automated tests for the vSphere Web Client.
Important notes, before you start:
Summary
Enabling automation of a Flex application requires a number of libraries to be built in the application. The instructions and bits provided here will allow you to build you own customized copy of the vSphere Web Client.
Here is a summary of the steps that you need to perform to achieve this:
The provided script (pom.xml) will include the following Adobe libraries in the Web Client build:
There are instructions how to include the Selenium Flex API library. The dependency is added in the build script for you, but is commented out.
Additionally you can include any arbitrary Flex library you want in your customized build of the UI.swf. Look for instructions in the PDF document within the ZIP file.
Enjoy!
Hi Peter,
>> Which version of the tool are you using? We are using version 3.0.0 internally.
I am using 3.02 version
>>Where did you get MonsterDebugger.swc from?
Through monster debugger tool, Open monster debugger. File-> Export SWC
>> How did you installed it to the local repository?
Using the command "mvn install:install-file -Dfile=MonsterDebugger.swc -DgroupId=com.test.monster -DartifactId=debugger -Dversion=1.0.0 -Dpackaging=swc"
>> How did you add the Monster Debugger to the container-app build? Can you send me the pom.xml?
By adding the dependency in pom.xml. Please find the attached pom.xml
Thanks in Advance.
Sorry for the delayed response.
Your pom.xml file looks perfectly fine. Can you send me the compiled UI.swf file?
Can you check the content of the maven repository to see whether the monster debugger swc was installed correctly?
Please list the content of the following folder:
<your_user_folder>/.m2/repository/com/test/monster/1.0.0/
Thanks,
~Peter
Hi Peter,
I have attached the compiled UI.swf which is located under "D:\vsphere-webclient-automation-6.0.1\swf\target\UI.swf"
Please find the below files under .m2 repository <user folder>\.m2\repository\com\test\monster\debugger\1.0.0
- _maven.repositories
- debugger-1.0.0.pom
- debugger-1.0.0.swc
Thanks in advance.
I decompiled the swf and I can see the monster debugger classes inside:
There are the files in MonsterDebugger.swc version 3.0.2:
Internally we are using MonsterDebugger.swc version 3.0.0 that contains two more files:
I will follow up with our QE team and try to find out more. In the mean time can you try with version 3.0.0?
Hi Peter,
I have installed Monster Debugger 3.0 and added MonsterDebugger.swc(3.0) library as dependency.
Even then I am unable to find the VSphere web client in Monster Debugger tool.
Note:
While decompiling the UI.swf am able to see the above files using Monster Debugger 3.0.
Thanks in advance.
Please check the following link:
Monster Debugger - Open Source Flash, Flex and AIR debugger
You need to initialize the MonsterDebugger somewhere in your plugin.
MonsterDebugger.initialize(
this
);
Please give it a try!
Do you have any progress on that? Did you manage to enable the MonsterDebugger?
Thanks,
~Peter
Hi Peter,
Sorry for the delay response.
Yes, After initialize the monster debugger in plugin, am able to view the web client in monster debugger tool.
Currently am working on identifying all the objects(getting id) in monster debugger.
Thanks in advance.
I am glad that it worked
~Peter
Thanks for your help and support
Hi Peter,
I went through the post and tried all possible solutions but not able to login to Web Client manually.
I followed the steps you provided and then restarted Virgo server and even rebooted vcenter.
Issue: The screen blacks out as soon as I login to the web client. "Unresponsive Plugin" error and then crash.
Environment: I am working on 6.0 U1 vCenter and FireFox
Please find UI.swf and pom.xml files attached.
Thanks,
Ashesh
Hi Peter,
We are able to 'mx' and other components, but we have a problem in automating spark and wizard(create Datastore, create New Virtual Machine)components.
This is due to "VMware QE Test framework(which has API's to automate spark and wizard components)" not compiled in 6.0 custom build, but we got it worked from custom build of version#5.5.1
We used below APIs to automate those components,
- clickTiwoDialogRawChilderButton()
- doFlexSparkType()
- doFlexSparkRadioSelect()
Please let me know, how can we automate such components.
Many Thanks,
Thameem
Hi Peter,
We are able to work only mx components, but other components like VMware ,Spark are unable to perform.
Eg: 1)while trying to click the plugin icon in the inventory list we are getting the below error
container_app.doFlexClick('name=ControlCenterShortcutItemRenderer2326','[iconName]')
"Error: The com.vmware.vsphere.client.views.controlcenter::ControlCenterShortcutItemRenderer control is not compatable with the flexClick command in this context"
2) While trying to click "Storage" in the navigator view, we are getting the below error
container_app.doFlexClick('automationName=nodeName','Storage')
"Error: The spark.components::Label control is not compatable with the flexClick command in this context"
Could you please provide the API methods to perform the VMware and Spark components.
Thanks in Advance
Hi Peter,
Can you please give an update?
Many Thanks,
Thameem
Hi Thameem,
Sorry for the delayed response.
You are correct that VMware QE Test Framework is not compiled in your custom build. At this point there is not much that I can do for you.
I can look for these functions and see if they can be easily extracted from the framework. But I don't promise anything...
~Peter
Hi Ashesh,
Sorry for the late reply.
Can you check which is the build number that you have?
Can you check other browsers too?
Have you noticed any errors during the maven build?
Also I would appreciate if you capture the maven build output in a file and send it to me.
Thanks,
~Peter
No Problem Peter,
Thanks a lot for your response. I have been using only below methods from QE Framework. Kindly try if those can get extracted from the framework,
============================================================
doFlexSparkType
doFlexSparkSelectDropDownListByIndex
doFlexSparkRadioSelect
doFlexSparkCheckUncheck
getSparkListIndexForValue
doSelectAdvancedDataGridItemByName
doSetFlexProperty
clickTiwoDialogRawChildrenButton
doFlexClickScrollingButtonBarItemAtIndex
selectMenuItemByName
doVisibleMouseOver
doVisibleMouseDownUp
===========================================================
Many Thanks,
Thameem
prmsvm
Unfortunately I don't have experience in writing Flex automation and I cannot help you with these errors.
I would recommend you to check the Adobe documentation and forums on automating Spark components.
Sorry, that I cannot help you with this
In regards to people do GUI automation on the WebClient, we are using vCenter 6.0 with TestComplete for our automation. Anyone using the same? Anyone see the automation running extremely slow?
Thanks
Hi, Peter!
I have acted according to your instructions, but have faced to some problems:
1) There has been the first problem at the step 2: on machine with Windows the result of "mvn install" commnad has been "[ERROR] Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:6.0.0 or one of its dependencies could not be resolved". But on machine with Linux (CentOS) "mvn install" have finished with success. In both cases I have used JDK Version 1.7.21 and Apache Maven Version 3.0.4.
2) I have replaced old container-app-war-6.0.0.war on my vCenter (Version 6.0.0, Build 3339083) and have restarted service.
After that I can't login to my vCenter with Windows credentials, but I can login with username and password.
But I don't now what to do next. I have Firefox with Selenuim IDE, but can't recond my actions in WebClient (the only exeption is login process, but Login page on html).
I have used your "vsphere-webclient-automation-6.0.0.zip" and uncommented lines related to Flex API in pom.xml file.
Also I have tried to use "vsphere-webclient-automation-6.0.1.zip", but the result has been the same.
Could you help me? There are 2 archive: 6.0.0.zip (with result of "vsphere-webclient-automation-6.0.0.zip" ) and 6.0.1.zip (with result of "vsphere-webclient-automation-6.0.1.zip"). The each atchive contains UI.swf (after "mvn install") and pom.xml (with uncommented lines) files.