The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

Pages: 1
harish_renu78
Member


Reged: 04/11/05
Posts: 34
Loc: Hyderabad
QTP's support for AJAX application
      #374142 - 04/18/07 12:22 PM

Recently our company has decided to use AJAX for presentation layer. I am curious to know whether QTP can test a web application whose UI is developed using AJAX technology. Currently we are using QTP 9.0.

Or we have to go for an add-in to support AJAX components.

Regards

--------------------
Harish,
Senior QA Engineer,
Virtusa India Pvt Ltd,
Hyd, India


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 15329
Loc: Milwaukee, Wisconsin
Re: QTP's support for AJAX application [Re: harish_renu78]
      #374205 - 04/18/07 10:20 PM

I dont think QTP would be the best tool to test for AJAX apps but you certainly can use it for testing AJAX application

The below was not for an AJAX app but the issue was similar

http://www.sqaforums.com/showflat.php?Ca...&PHPSESSID=

--------------------
Regards,
Tarun
** First ever technical novel - And I thought I knew QTP! **
** Download QTP Unplugged 2nd Edition eBook for FREE **

KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
Turbografx
Super Member


Reged: 10/21/05
Posts: 1756
Loc: London, U.K
Re: QTP's support for AJAX application [Re: harish_renu78]
      #374246 - 04/19/07 03:29 AM

Quote:



Or we have to go for an add-in to support AJAX components.

Regards




There are no 'AJAX components'. All you need is the web addin. I have been testing ajax sites for 2 years with no problems.


Post Extras: Print Post   Remind Me!   Notify Moderator  
sanjeetjena
Newbie


Reged: 04/22/07
Posts: 7
Loc: pune
Re: QTP's support for AJAX application *DELETED* [Re: Turbografx]
      #374948 - 04/22/07 11:19 PM

Post deleted by IanF

Post Extras: Print Post   Remind Me!   Notify Moderator  
Turbografx
Super Member


Reged: 10/21/05
Posts: 1756
Loc: London, U.K
Re: QTP's support for AJAX application [Re: sanjeetjena]
      #374995 - 04/23/07 03:39 AM

Here's a better idea. Why don't you tell us what problems you have faced and then we can look at some solutions for your problems.

Post Extras: Print Post   Remind Me!   Notify Moderator  
sanjeetjena
Newbie


Reged: 04/22/07
Posts: 7
Loc: pune
Re: QTP's support for AJAX application [Re: Turbografx]
      #375556 - 04/24/07 09:40 AM

Actually, i have to give a presentation on the possible issues that a person can face while testing ajax using qtp.
Also, the ways of over coming those issues.

You wrote that you are testing ajax for more than 2 years, so thought of asking you.

Here is a situation,

As far as i know, one cann't use ".sync" function for AJAX. 'coz, when e we give some input, the page is suppose to be get loaded, in AJAX, the datatable or the area of the page where the data is expected get refreshed and not the entire page.
So, one cann't use ".Sync". cann't use ".Wait" property as one cann't predict the time required for loading the data.

Can you please give me an idea to over come this problem.

Thanks
Sanjeet


Post Extras: Print Post   Remind Me!   Notify Moderator  
Turbografx
Super Member


Reged: 10/21/05
Posts: 1756
Loc: London, U.K
Re: QTP's support for AJAX application [Re: sanjeetjena]
      #375586 - 04/24/07 11:07 AM

Well that's better than original post.

I can't comment on ".sync" because I never use it.

However, I think the question for AJAX applications would be does QTP continually search the DOM for objects. If it does, then what does it matter if content is dynamically loaded?

I think you need to download the trial version, test your application, then post any questions you have.


Post Extras: Print Post   Remind Me!   Notify Moderator  
sanjeetjena
Newbie


Reged: 04/22/07
Posts: 7
Loc: pune
Re: QTP's support for AJAX application [Re: Turbografx]
      #376593 - 04/27/07 08:57 AM

ok. Will do that.

But jus wanna know how will u design ur script for the situation where u have given some input n click on "Submit" sutton. Now,u expect a result table to get displayed in the web page.

how will u make the script wait till the result table get loaded n then verify the data?

Please let me know.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Turbografx
Super Member


Reged: 10/21/05
Posts: 1756
Loc: London, U.K
Re: QTP's support for AJAX application [Re: sanjeetjena]
      #376633 - 04/27/07 11:01 AM

You would do it the same way as any other web application - object synchronization. Don't confuse this with browser synchronization.

Post Extras: Print Post   Remind Me!   Notify Moderator  
wdragon007
Member


Reged: 04/21/05
Posts: 75
Re: QTP's support for AJAX application [Re: Turbografx]
      #573941 - 06/10/09 06:54 AM

Okay, so I recently got assigned a project that uses AJAX widgets to dynamically load pages. I can deal with non-dynamic pages but this is my first experience with AJAX.

I threw together a basic script using the record function (which I planned to modify to eliminate the OR and go the DP route for easier management of the scripts) but for some reason QTP is not recognizing any of the dynamic web elements - even using the original descriptors in the OR. Basically, it recorded the inital 'walkthrough' but refused to replay the action.

When attempting to use the object spy on a dynamic object, the only thing returned are the Browser and Page objects. Is there a way to get the object spy to recognize the dynamically generated object or is there a setting that needs to be set to 'refresh' the script so that any new objects added to the page are detected?

Any help on this would be *greatly* appreciated and might help prevent future skull damage from me pounding my head into my desk.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Turbografx
Super Member


Reged: 10/21/05
Posts: 1756
Loc: London, U.K
Re: QTP's support for AJAX application [Re: wdragon007]
      #573947 - 06/10/09 07:00 AM

Do you know which toolkit your application is using?

Object spy will usually display a WebElement, is this not the case?

Record and playback usually fails for these objects because mandatory/assistive properties are dynamic.


Post Extras: Print Post   Remind Me!   Notify Moderator  
wdragon007
Member


Reged: 04/21/05
Posts: 75
Re: QTP's support for AJAX application [Re: Turbografx]
      #573994 - 06/10/09 09:28 AM

Quote:

Do you know which toolkit your application is using?



Honestly, I have no idea. I'll see if I can get an answer from the developers.

Quote:

Object spy will usually display a WebElement, is this not the case?



That is correct. Mousing over on all of the dynamic elements only show browser and page objects. Clicking directly on one of the webelements only shows those two levels (B.P) as well. I've never seen this problem before but then this is the first project I've dealt with that used AJAX. So far, I'm not liking it.


Post Extras: Print Post   Remind Me!   Notify Moderator  
baiju
Junior Member


Reged: 07/05/03
Posts: 4
Loc: Bangalore
Re: QTP's support for AJAX application [Re: harish_renu78]
      #575523 - 06/19/09 02:09 AM

Harish,

Can u help me start with database checkpoint .How to learn?


Post Extras: Print Post   Remind Me!   Notify Moderator  
RajHaldar
Member


Reged: 10/04/06
Posts: 114
Loc: Boston, MA
Re: QTP's support for AJAX application [Re: baiju]
      #575630 - 06/19/09 08:32 AM

Using QTP with AJAX applications sometimes gets very tricky. And yes the .Sync method doesn't work for most AJAX applications neither does the brower ready state or browser sync.
You wont even be able to wait to see if the Dynamic object exists or not, because all the objects are loaded and using DP you'll end up getting those objects even if they are not visible on the application.

We used a DOM object which would change its state or contain a flag specifying when the page is fully loaded and available for interactions.. Same thing with dynamic tables and other elements.
We had to request the dev team to add in these dom objects for us.


Post Extras: Print Post   Remind Me!   Notify Moderator  
wdragon007
Member


Reged: 04/21/05
Posts: 75
Re: QTP's support for AJAX application [Re: RajHaldar]
      #575662 - 06/19/09 02:11 PM

Okay, so I'm curious to know if there is a way to 'trick' QTP into refreshing it's recognition of objects on a dynamically generated page. I tried Browser().Page().RefreshObject and that's still not working -- the scripts aren't recognizing the WebElements correctly.

For the most part, the only thing that the script is recognizing are the browser and page objects. The dynamic content is being listed as a WinObject. Ugh. I'm starting to think that automation isn't going to be an option here.


Post Extras: Print Post   Remind Me!   Notify Moderator  
AnshooArora
Advanced Member


Reged: 10/27/07
Posts: 612
Loc: New Delhi, India
Re: QTP's support for AJAX application [Re: wdragon007]
      #575667 - 06/19/09 03:48 PM

I have created a small utility for synchronization with AJAX applications which can be found here.

I hope it helps.

--------------------
Regards,

Anshoo Arora
[AdvancedQTP] [LinkedIn] [Relevant Codes]



Post Extras: Print Post   Remind Me!   Notify Moderator  
AnshooArora
Advanced Member


Reged: 10/27/07
Posts: 612
Loc: New Delhi, India
Re: QTP's support for AJAX application [Re: AnshooArora]
      #586977 - 08/21/09 11:32 AM

Please disregard the URL above.

Updated URL: http://relevantcodes.com/qtp-synchronization-for-ajax-applications/

--------------------
Regards,

Anshoo Arora
[AdvancedQTP] [LinkedIn] [Relevant Codes]



Post Extras: Print Post   Remind Me!   Notify Moderator  
RoiC
Member


Reged: 02/04/09
Posts: 29
Re: QTP's support for AJAX application [Re: AnshooArora]
      #590915 - 09/14/09 06:38 PM

I suggest you read the post on the HP blog below regarding this important topic:

http://www.communities.hp.com/online/blo...plications.aspx

--------------------
Any information given by me in this blog is done not as part of my formal job and on a personal level due to my interests.

My HP Blog "The Future of Testing": http://www.communities.hp.com/online/blogs/functionaltesting/default.aspx


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 102 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 17312

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5