SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Read the Error message list from POPUP window(ie)

    Hi all,

    I have Form with number of Cells in my application and VALIDATE BUTTON.
    I enter wrong values in those cells and click "Validate Button"

    I will get a POPUP window or Web Dialog with all the
    Error messages in that popup window with OK CANCEL Buttons.

    I just want to read all the error messages from the popup window.

    I tried to do Standard Output value.

    I am getting error like object not identified.

    Please, please help me how to read the error messages to
    String or data table.

    LakshmiSarat
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Nov 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(ie) *DELETED*

    Post deleted by Tarun Lalwani

  3. #3
    Senior Member
    Join Date
    Sep 2004
    Location
    Phoenix, AZ
    Posts
    198
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(ie)

    Add "popup window" object to OR and see how the object is identified. Then use 'getRoProperty' method some thing like this to read the error messeges.

    x=Browser(B).Page(P).window(popup).getRoproperty(" text")

    Then you can validate 'x' value.


    Thanks!
    VasuK
    Thanks!
    VasuK

  4. #4
    Junior Member
    Join Date
    Nov 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(ie)



    Browser(B).Page(P).window(popup).getRoproperty("te xt")

    The popup object was not recognized.

    Thankyou,
    LakshmiSarat

  5. #5
    Junior Member
    Join Date
    Nov 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(ie)

    Hi Tarun Lalwani

    May I know why it was deleted.

    -LakshmiSarat

  6. #6
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(

    Give a try with TextUtil object. Look at QTP online help for sample code.

  7. #7
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(

    [ QUOTE ]


    Browser(B).Page(P).window(popup).getRoproperty("te xt")

    The popup object was not recognized.

    Thankyou,
    LakshmiSarat

    [/ QUOTE ]
    You quoted the same text that was there in your original post.

  8. #8
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(

    Looking at the screen shot it seems the popup window is just another browser being opened. Add the popup browser window to Object repository and you will see it as Browser object.

    Then you need to get the complete text from the browser
    <font class="small">Code:</font><hr /><pre>
    allText = Browser("Popup").object.documentElement.outerText

    Public Function GetTextAfter(OriginalText, TextAfter, NumOccurences)
    Dim iPos, iMatches

    iMatches = 0
    iPos = 0
    Do
    iPos = InStr(iPos+1, OriginalText, TextAfter)
    iMatches = iMatches + 1
    Loop While iPos &lt;&gt;0 And iMatches &lt; NumOccurences

    If iPos = 0 Then
    GetTextAfter = ""
    Else
    GetTextAfter = Mid(OriginalText, iPos + Len(TextAfter))
    End If
    End Function

    Msgbox GetTextAfter(allText, "Error Message List", 1)

    </pre><hr />

  9. #9
    Junior Member
    Join Date
    Nov 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(

    Hi Tarun,

    I have tried to add the window.(looks like it is already there in Object Repository.) I am not sure if this is another browser thats opening up. This is a "Web Page Dialog" box.


    When i recorded it was recorded and it is there in Active Screen.

    But,even if i try to put a check point i am getting("Can not identify the object "OK" (of class Webbutton). Verify that this object's properties match an object currently displayed in your application.")

    I am attaching the screen shot as well as the code from the development. Please suggest me.


    Thank you,
    LakshmiSarat.
    Attached Files Attached Files

  10. #10
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Read the Error message list from POPUP window(

    Mmm... Try this


    allText = Browser("Main Browser").Window("is owned window:=True").Page("micclass:=Page").Object.docum entElement.outerText

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.34%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:45 AM.

Copyright BetaSoft Inc.