Archive for September, 2011

Flex applications show up as Macromedia Flash objects on QTP Object Spy

Issue :

Flex applications show up as Macromedia Flash objects on QTP Object Spy

Potential Causes :

Ensure the your environment works on Automation enabled build from Adobe, Please refer : http://www.adobe.com/devnet/flex/samples/flex_store_v2.html

  • If the app does not work,the possible causes are

-Issues with compatibility of QTP-Browser-Flex Plugin/Addin
-The Communication between ActiveX Plugin in the browser for Flex-QTP Automaiton Plugin and QTP is interrupted due to Browser Security settings.

  • If the app works then the issue in your environment but your application, the possible causes are

-Application is not compiled with automation swc files i.e. Flex Automation libraries.

Solution :

Issues with compatibility of QTP-Browser-Flex Plugin/Addin

Please refer : http://blogs.adobe.com/vikaschandran/2010/07/10/compatibility-matrix-for-flex-qtp-plugin-3-0-0-and-4-0-0-for-qtp-and-ie-combinations/

 

Application is compiled with automation swc files i.e. Flex Automation libraries.

Please refer :

Compiling Flex 3 Applications to enable automation

http://blogs.adobe.com/vikaschandran/2010/07/11/compiling-flex-3-applications-to-enable-automaiton/

Compiling Flex 4 Applications to enable automation

http://blogs.adobe.com/vikaschandran/2010/07/15/compiling-flex-4-applications-to-enable-automaiton/

 

The Communication between ActiveX Plugin in the browser for Flex-QTP Automation Plugin and QTP is interrupted due to Browser Security settings

This can be avoided by ensuring the following

-the TEAPluginIE.dll which is used by IE ActiveX for the Flex-QTP plug-in loads in Internet explorer when QTP is recording

Because if it’s not loaded in IE nothing would work, Process Explorer should help you check the same.

-the behavior of the Object Spy changes [win objects start showing up] if you change i.e. increase the security properties on the browser for internet and intranet

-if you keep both internet and intranet security to medium or low

i.e. basically allowing the Flex-QTP ActiveX component to do its job without hindrance. Everything would work fine.

Debugging checking and tracking variables in QTP with Flex-QTP Addin

ISSUE

Debugging and tracking variables in QTP

SOLUTION

Have a look at QTP  break point options in the image below

the red dots you see in QTP in the image below are the Break points

 

-right click on the Breakpoint to see the options,

-Use “Run from Step” and “Run to step”

 

Or Use “Debug from Step”

To add the variables to debug viewer you need to add watch on them use “Add to watch”

and check the “Debug viewer” panel to have look at the variables,

 

And once the playback starts use “F10” and “F11” to step through the Automation Scripts line by line

keep an eye on the “Object Repository

To check on the values,

You may also use the following code

myvariable=Browser(“Browser”).SparkApplication(“ADGFidelity182547968Nikhil”).SparkPanel(“AdvancedDataGrid Control”).FlexAdvancedDataGrid(“myADG”).GetROProperty(“automationname”)

print myvariable               //myADG that you see on the image below is the print output

myvariable2=Browser(“Browser”).SparkApplication(“ADGFidelity182547968Nikhil”).SparkPanel(“AdvancedDataGrid Control”).FlexAdvancedDataGrid(“myADG”).GetROProperty(“automationindex”)

msgbox  myvariable2     //index:0 is the msgbox output


Red X instead of image in distributed environment ColdFusion 8 or 9 and IIS : Coldfusion does not serve the Static content by default

ISSUE

Red X instead of image in distributed environment ColdFusion 8 or 9

i.e. when IIS and ColdFusion are on 2 separate physical servers and files [Static content or Dynamic content] does not reside on Web Server but resides on Application server i.e. server machine which has ColdFusion.

SOLUTION [One of the possible solutions]

Basically when it comes to Static content like images,
ColdFusion does not serve the Static content by default

It looks to IIS to serve static content [due to the mapping that are set while configuring the web connector only CFM, CFC, CFR, CFML i.e. ColdFusion specific content would be processed by ColdFusion]

So when you place a request for any content,

by default the request goes to IIS first it checks the extension of the file requested,

if the extension matches the ones which correspond to ColdFusion extensions,

The request is forwarded to ColdFusion to be processed.

 

If not it goes to IIS for processing.

 

Since in certain environments its not possible to keep the files in IIS webroot

And all files are required to be kept at the Application Server Tier/Level.

 

All we need to resolve this issue is to setup the application to use a context root.

So modify the

“Application.xml”

file under location “C:\JRun4\servers\<server instance>\cfusion-ear\META-INF”

 

<web>

<web-uri>cfusion-war</web-uri>

<context-root>/</context-root>

</web>

 

To use an appropriate Context root.

Say

<web>

<web-uri>cfusion-war</web-uri>

<context-root>/Aline</context-root>

</web>

This would force the Application to serve the static content from the Application Server end.

And the control would not go to IIS to serve the static content.

Port number required While configuring the web connector in distributed environment between IIS and Coldfusion 8 or 9

ISSUE

Port number required While configuring the web connector in distributed environment between IIS and Coldfusion 8 or 9

SOLUTION

While configuring the connector using the “Wsconfig” tool in distributed environment between IIS and Coldfusion we need access to 3 port numbers

The Remote port :

At “C:\Jrun4\servers\<serverInstance>\SERVER-INF\jndi.properties”

At line

java.naming.provider.url=localhost:2904

Here 2904 is the remote port.

The Proxy port :

At “C:\Jrun4\servers\<serverInstance>\SERVER-INF\jrun.xml”

<service class=”jrun.servlet.jrpp.JRunProxyService” name=”ProxyService”>

<attribute name=”activeHandlerThreads”>25</attribute>

<attribute name=”backlog”>500</attribute>

<attribute name=”deactivated”>true</attribute>

<attribute name=”interface”>*</attribute>

<attribute name=”maxHandlerThreads”>1000</attribute>

<attribute name=”minHandlerThreads”>1</attribute>

<attribute name=”port”>51020</attribute>

 

Here 51020 is the proxy port

 

And the RMI port [there is no way to determine this port ]: so disable firewall while configuring the connector in distributed architecture,

once the connector is configured re-enable the firewall with exceptions for Proxy port [Mandatory]

ADDITIONAL INFORMATION

If this does not work the only way to configure a connector is

Manual Configuration of Web Connector

please refer : http://www.adobe.com/devnet/coldfusion/articles/iis-configuration.html