-
Object not visible.
I am new user of qtp, when i play the recorded test then system shows error,. " Object not visible" . Then i used the qtp > option > win.application > setting and record new test, same time another error shows
" Cannot find the "Cancel" object's parent "Add Person Wizard" (class SwfWindow). Verify that parent properties match an object currently displayed in your application."
Many time i try to handled this using spy object but cannot complete atleast one test.
my application is .NET using costomised control.
any one can help me.
Thanks.
Arshad.
-
Re: Object not visible.
Are you using DP to perform this testing or OR or both? Please provide more detail.
-
Re: Object not visible.
[QUOTE]I am new user of qtp, when i play the recorded test then system shows error,. " Object not visible" .[/QUOTE]
I'm a new user too and have come across this problem as well.
It almost seems like QTP has no concept of delays, or at least doesn't store anything time related in the tests that are automatically generated through the recording part of the application. There also doesn't appear to be a mechanism within QTP to force the test to wait until a given form or control is shown before proceeding.
Assuming I haven't missed anything here then this means that if there is a delay of 5 seconds between you recording step 1 and step 2 of the test then QTP will have problems with step 2 when you run the test.
This is because it will try and execute step 2 immediately rather than wait 5 seconds first. These delays often ends up with QTP trying to click a button that doesn't exist or do something on a dialog that hasn't been shown yet.
I'm hoping to find out a way of looping around until the control is found, but until then the only way I've found to get around this problem is to use the 'Wait' command in the expert view to force the test to wait a given amount of time.
-
Re: Object not visible.
Hi Patrick,
You are correct in your conclusion, that we need to use some loopign method to check for the existence of the object rather than use the wait().
Let me try to assist you with a coding idea I use -
Write a looping structure which would keep incremeting by 2 secs. Every time within the loop, perform the following -
if Browser("abcd").Page("abcd").winButton("abcd").exists then
exit
else
increment timer
Keep the looping counter to a desired maximum timelimit (Secs).
I have put the entire code in a user-defined function called as Wait_for_Object which I use instead of using wait(). I pass the Object Name as a parameter to the same.
I have given you a rough idea and not the exact code. Let me know incase of any difficulties.....
Cheers....
-
Re: Object not visible.
That was a quick reply. :D
Thanks for the tip. I'll have a look into that in a little while. Do you know though if there is any built-in way of doing this without having to resort to custom code? Executing actions often takes a little while and it seems odd that this sort of testing application does not seem to have any method of dealing with this situation from within the application and without the need for any coding.
-
Re: Object not visible.
u can also give name to not visible object what ever u wann
-
Re: Object not visible.
I've just come across the object.Exist() method that seems to do the same thing. I can even pass in a timeout value as a parameter - in milliseconds - that tells QTP when to stop checking for the existance of the object.
-
Re: Object not visible.
As per my knowledge the best way to make the tool to wait until the page or object appears
[COLOR="Red"]
Do
Wait(1)
Loop until Browser("Browser Properties").Page(Page Properties").WebElement("Object Properties").Exist[/COLOR]
Please let me know if i am wrong
-
Re: Object not visible.
Hi Test,
The use of Exists method as mentioned by you is an absolutely correct method. It is better than using the wait() function.
The same Exists method has been mentioned in the replies posted earlier in the thread.
Cheers.....
-
Re: Object not visible.
if the QTP is saying that the object not visible .
as per my knowledge this is QTP is unable to find the object
check whether one object is linked to other object or not
i mean that if one object
suppose OK button enables when u have clicked on YES
while recording it will we ok
but while running if there is any problem regarding to POP window
then QTP will also be showing the same error
plz check
plz guide me if i'am wrong
-
Re: Object not visible.
[QUOTE=PatrickSeurre;23529]I've just come across the object.Exist() method that seems to do the same thing. I can even pass in a timeout value as a parameter - in milliseconds - that tells QTP when to stop checking for the existance of the object.[/QUOTE]
u r correct man...
this is the best solution ..i have ever used....
Brow("vvv").Page("bb")......Exist(5)
-
Re: Object not visible.
[QUOTE=dasiga;24161]if the QTP is saying that the object not visible .
as per my knowledge this is QTP is unable to find the object
check whether one object is linked to other object or not
i mean that if one object
suppose OK button enables when u have clicked on YES
while recording it will we ok
but while running if there is any problem regarding to POP window
then QTP will also be showing the same error
plz check
plz guide me if i'am wrong[/QUOTE]
yes ...this might be also a possible reason.....u can also check the add ins..
-
Re: Object not visible.
Are you using multiple displays?
QTP gives me this error occasionally when I am trying to activate or click an object in the secondary display. Using the ObjectName.Exist method returns a "true" result, but when I try to interact with the object, I get that error.
To fix up the problem, I simply had to move the window to the primary display.
Hope that helps you out.
-
Re: Object not visible.
hi,
i m a new user in this geekinterview.i have many questions to ask in Vbscript.like how i have to start the vbscript.and any tutorials are to learn vbscript in bangalore.if anyone knows can you plz help me....
-
Re: Object not visible.
I want to add that none of the above solutions worked for me. I was getting the error while attempting to do a SelectRow on an SwfTable.
I was able to fix it by first doing a MakeCellVisible method. I hope this helps someone who had the same issue I did.