Problem in Page sync

265 views
Skip to first unread message

Suresh Pandian

unread,
Apr 24, 2012, 4:32:25 AM4/24/12
to QTP - HP Quick Test Professional - Automated Software Testing
Hi all,

I have a problem with the page synchronization, In my application the
synchronization is done using an image, the image will appear until
the page loads and the status of the Browser is displayed as "Done"
before the page is getting loaded.

we tried Browser(Browsername).sync , Page(pagename).sync and also
waitProperty."State",4 for each object we click or enter the values.

Wait property somehow is working but it is taking too long to click or
enter the data.

Your help is highly appreciated.

Regards,
Suresh

uma mahesh

unread,
Apr 24, 2012, 6:48:12 AM4/24/12
to mercu...@googlegroups.com
Use

Do until OBJ.exist
Loop

Anish Pillai

unread,
Apr 24, 2012, 10:59:35 AM4/24/12
to mercu...@googlegroups.com
This is a common issue with many we applications. As Uma Mahesh mentioned, Image.Exist should work in your case since the image is being used for synchronization.

There is one more method that you can try out here. This would work for general sync. When a page loads you would see a progress bar at the bottom. When the page gets loaded completely this progress bar is not visible. So you can use a do loop till the progress bar is visible. Once it becomes invisible, the page loads completely.

Hope this helps..



--
ar

Deepak Kumar Mahapatro

unread,
Apr 24, 2012, 11:55:07 AM4/24/12
to mercu...@googlegroups.com
Hi Suresh,

you can try below code that uses the native property readyState
<object hierarchy>.object.readyState. result of the statement can be any of the below

uninitializedThe object is first instantiated but has not begun loading.
loadingThe object has commenced loading.
loaded The object has completed loading.
interactiveThe object is loaded but not yet closed but is ready to handle interaction.
completeThe object body has been closed and the loading is finished.
(the table is copied from http://www.ssicom.org/js/x584623.htm)

for page object readystate retuns either interactive or complete

please let me know the result

--
Regards,
Deepak

uma mahesh

unread,
Apr 27, 2012, 1:53:49 AM4/27/12
to mercu...@googlegroups.com
Hello Depak,

Can you please send any example line of script..
Would like to see how the line of code will come when we are using this following methods.

Regards
'========================================================

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Suresh Pandian

unread,
Apr 27, 2012, 7:14:53 AM4/27/12
to QTP - HP Quick Test Professional - Automated Software Testing
Thanks to everybody for the reply, however these options didn't work.
I cant use the progress bar because it is getting displayed as Done
before the page load is complete and image still appears on the page.

and i also tried with the object.readystate. This result is always
giving me "Complete" i tried looping it to find the status from the
begining however it displayed only Complete even after the image was
hidden. They have used Ajax and running some script like
"ScriptResource.axd". Only the value of object.sourceindex changes
when the object is visible and then made hidden and i am not sure if
we can use that and will the value be constant across all the pages.

Your help is highly appreicated.

Regards,
Suresh





On Apr 27, 10:53 am, uma mahesh <umamahesh...@gmail.com> wrote:
> Hello Depak,
>
> Can you please send any example line of script..
> Would like to see how the line of code will come when we are using this
> following methods.
>
> Regards
> '========================================================
>
> On Tue, Apr 24, 2012 at 9:25 PM, Deepak Kumar Mahapatro <
>
>
>
>
>
>
>
> deepakkumarmahapatro...@gmail.com> wrote:
> > Hi Suresh,
>
> > you can try below code that uses the native property readyState
> > <object hierarchy>.object.readyState. result of the statement can be any
> > of the below
>
> > uninitializedThe object is first instantiated but has not begun loading.
> > loadingThe object has commenced loading.loaded The object has completed
> > loading.interactiveThe object is loaded but not yet closed but is ready
> > to handle interaction. completeThe object body has been closed and the
> > loading is finished.(the table is copied from

iRahulSingh

unread,
Apr 29, 2012, 1:53:33 AM4/29/12
to QTP - HP Quick Test Professional - Automated Software Testing
Hi Suresh,

I'm not sure whether the following solution will help you or not but
the same issue i've faced once but in my case there is one property of
the image that is appearing while other objects on the page are gtting
downloaded is to look out for imageobj.Object.Style.Display property.
Since you have mentioned your application is using Ajax, hence this
property will change when image will be visible else it would properly
have value BLANK ("") or NONE.

Give it a try and it would be helpful if you give few lines of html
source code f your application to track the issue much better.

Hope it will be of any help.

Cheers..
> > >http://groups.google.com/group/MercuryQTP?hl=en- Hide quoted text -
>
> - Show quoted text -

Suresh Pandian

unread,
Apr 30, 2012, 1:44:33 AM4/30/12
to QTP - HP Quick Test Professional - Automated Software Testing
Hi Rahul,

Thanks for your help, i tried you the commands it gives only a blank
value all times. Here is the html code

<script src="/ScriptResource.axd?
d=fEhQSZfU4ZH4IcFnRRCK6JkNcTghVq45kaN964-4RtE70BZUMWg4wFi4IL3fr7vbZkuccJFlOH-
FJ-clyqesAkSfZ3zb2OAe9iQSiFyP-
M7oTWcmXGocpVBclQp1EfLAruZAtqAma45pl3zFO3zKwv4nccch1c9kpI0MYckmnsfzmTw-
zvdZYqJFS1Aj4qgk0&amp;t=ffffffff940d030f" type="text/javascript"></
script>
<div style="visibility:hidden;display:none;">
<img src="/Images/img1.png" alt=""/>
<img src="/Images/img2.gif" alt=""/>
<img src="/Images/img3.gif" alt=""/>
<a id="proxyAnchor" href="#" style="display:none;"></a>
</div>

thanks for your help!
> > > >http://groups.google.com/group/MercuryQTP?hl=en-Hide quoted text -

Suresh Pandian

unread,
May 1, 2012, 2:30:58 PM5/1/12
to mercu...@googlegroups.com
Hey Guys,

thanks for all you help, just found out the solution. imageobj.Object.currentstyle.visibility. i found out using trail and error basis.

Regards,
Suresh
Reply all
Reply to author
Forward
0 new messages