Results 1 to 15 of 15

Thread: Object not visible.

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    3

    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.


  2. #2

    Re: Object not visible.

    Are you using DP to perform this testing or OR or both? Please provide more detail.


  3. #3
    Junior Member
    Join Date
    Dec 2007
    Answers
    4

    Re: Object not visible.

    I am new user of qtp, when i play the recorded test then system shows error,. " Object not visible" .
    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.


  4. #4
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    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....


  5. #5
    Junior Member
    Join Date
    Dec 2007
    Answers
    4

    Re: Object not visible.

    That was a quick reply.

    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.


  6. #6
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    Re: Object not visible.

    u can also give name to not visible object what ever u wann


  7. #7
    Junior Member
    Join Date
    Dec 2007
    Answers
    4

    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.


  8. #8
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

    Re: Object not visible.

    As per my knowledge the best way to make the tool to wait until the page or object appears

    Do
    Wait(1)
    Loop until Browser("Browser Properties").Page(Page Properties").WebElement("Object Properties").Exist


    Please let me know if i am wrong


  9. #9
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Smile 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.....


  10. #10
    Junior Member
    Join Date
    Jan 2008
    Answers
    5

    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


  11. #11

    Re: Object not visible.

    Quote Originally Posted by PatrickSeurre View Post
    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.
    u r correct man...
    this is the best solution ..i have ever used....
    Brow("vvv").Page("bb")......Exist(5)


  12. #12

    Re: Object not visible.

    Quote Originally Posted by dasiga View Post
    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


    yes ...this might be also a possible reason.....u can also check the add ins..


  13. #13
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

    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.


  14. #14
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    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....


  15. #15
    Junior Member
    Join Date
    Apr 2008
    Answers
    1

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact