Results 1 to 3 of 3

Thread: How to check an object is not visible.

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

    How to check an object is not visible.

    Hi All,

    I am a very new to autoamtion and QTP.

    Within a page, there are few sections. All these sections are visible for some users. However, some sections are not visible to some users.

    Let's say, A page contain sections:

    1) Checking
    2) Saving
    3) CD

    I want to check that CD section is not visible.


    Could you provide me instructions/tricks of how to verify object or text is not visible on the page.


    Thanks


  2. #2
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: How to check an object is not visible.

    Capture the CD Section in Object Repository.

    check for if its a Standard Control(Frame Probablyy...)


    Adda CheckPoint to the Visible Property.


    Regards,
    Nawab


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

    Re: How to check an object is not visible.

    - Start QTP
    - Start Page
    - Start recording on QTP
    - Click Checking, then click Saving, then click CD.
    - Stop recording

    - In QTP, switch to expert view, you should see something similar.
    Browser("Your_Browser").Page("Your_Page").WebButton("Checking").Click
    Browser("Your_Browser").Page("Your_Page").WebButton("Saving").Click
    Browser("Your_Browser").Page("Your_Page").WebButton("CD").Click

    - One method you can use, modify the above and assign ("visible") to a variable, for example:

    ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ' Variable listing
    varChecking = Browser("Your_Browser").Page("Your_Page").WebButton("Checking").GetROProperty("visible")

    varSaving = Browser("Your_Browser").Page("Your_Page").WebButton("Saving").GetROProperty("visible")

    varCD = Browser("Your_Browser").Page("Your_Page").WebButton("CD").GetROProperty("visible")
    ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If varCD = True Then
    MsgBox "The CD button was found on this page"
    Else
    MsgBox "The CD button was NOT found on this page"
    End If
    ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    Quote Originally Posted by qtplearn123 View Post
    Hi All,

    I am a very new to autoamtion and QTP.

    Within a page, there are few sections. All these sections are visible for some users. However, some sections are not visible to some users.

    Let's say, A page contain sections:

    1) Checking
    2) Saving
    3) CD

    I want to check that CD section is not visible.


    Could you provide me instructions/tricks of how to verify object or text is not visible on the page.


    Thanks



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