Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
synchronization issue...
#1
Not Solved
Hi,

Am new in QTP...

When I run my tests from QC, sometime QTP and my web ERP get desynchronized for one test and then the remaining tests fail Sad . (For the last week all my night runs failed... not always on the same test).

What could I do to fix the pb ? (some colleagues told me to use "wait" and "synchro" but the pb still there - I added a "teardown" function that closes the all the browser windows... Tongue )

I thought that QTP would be waiting for the information/button/etc. to be displayed before it fields a field/click on button/etc... was I wrong? Do I have to handle the synchronization for every field/button with which I want to interact?

Thanks for your help.

Freddy
Reply
#2
Not Solved
Problem is QC overrides Tools > options > Run mode setting of QTP at the time of execution.

there are 2 solutions,
1. Either you put waitproperty statement for the object to be visible and then proceed
2. or there is generate script button, which will generate a txt or vb or qfl file. which you can associate with library files so that QC will use the settings which you have set explicitly. In one of my posts, ankur has given solution for this problem using library files. That post is in "Other" category.
Reply
#3
Not Solved
Or you can use the below procedure...

' First set the browser / window object to a variable.

Code:
Set SomeBrowser = Browser("name").Page("name")
Call ToWaitUntil(SomeBrowser)

Public Sub ToWaitUntil(SomeBrowser)
      Do
          Wait 1
      Loop Until SomeBrowser.Exist(1)
End Sub

' The problem with this procedure is that if for some reason the browser remains the same, then it will become an infinite loop.... also, you can use while instead of Until.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Object Synchronization as_srini 2 3,126 11-12-2011, 11:04 AM
Last Post: nistalaramesh

Forum Jump:


Users browsing this thread: 1 Guest(s)