SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Feb 2001
    Location
    dublin
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Looking to extract a few lines of text instead of just one line from message box

    Hi,
    Basically i am looking to use the gettext method / so as i can extract the whole line of text. Currently when i do so it brings up an error. Due to the information on the dialog is more than one line long. Is there a way to do this or do i need to use another method. (getcontents). thx...

  2. #2
    Member
    Join Date
    Jan 2001
    Location
    Westborough, mA, USa
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    I am not sure what ur problem is. But try GetMultiText() which would return all the lines in a TextField class.
    Hope this helps

  3. #3
    Pal
    Pal is offline
    Apprentice
    Join Date
    Jan 2001
    Location
    Levittown, NY,USA
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    You will get all text when verify properties in $Full caption.
    Thanks
    Pal

  4. #4
    Junior Member
    Join Date
    Feb 2001
    Location
    dublin
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    thx.. I cannot use the multitext option as its for a browser message
    I wish to verify the text using an if statement however when i use this i cannot seem to be able to verify the second line is there a special insert key for telling silk to look to nexxt line of dialog box for rest of statement.. Using the verify properties method is not the way to do it as tests fall over should that fail.

    [This message has been edited by leinster51 (edited 02-27-2001).]

  5. #5
    bjc
    bjc is offline
    Member
    Join Date
    Jan 2000
    Location
    CT
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    If the string that you want to verify is from a message box, the following will work:


  6. #6
    Junior Member
    Join Date
    Feb 2001
    Location
    dublin
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    This is what i am currently using is
    [ ] nMessage = BrowserMessage.Message.GetText()
    [ ]
    [ ] MessageBox.SetActive ()
    [ ]
    [-] if nMessage == ("Success creating whatever")
    [ ] Print ("Test Passed for prompt for checkbox pressed")
    [-] else
    [ ] LogError ("Test Failed")
    [ ] Print (nMessage)

    However this runs into problems when i use the message box displays text that is on the second line. Cannot verify the exact text that appears as it is over one line in length. I though there might be a way to specify during the middle of the line to tell silk to goto next text line.

  7. #7
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    What do you get when you do:

    BrowserMessage.GetContents() ?

    Does this return all of the lines (along with everything else in the window) ?
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  8. #8
    Member
    Join Date
    Nov 2000
    Location
    Newport News, VA U.S.
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    I hope this helps...

    <Code><pre>
    [ ] INTEGER iPos
    [ ]
    [ ] // If you want to do an exact match of messages, then look at the following:
    [ ]
    [ ] // "{chr(10)}" denotes a carriage return,
    [ ] // so the text comes after this notation is on the next line
    [ ] STRING sExpectedText = "Your message 1st line blah blah{chr(10)} and 2nd line blah blah"
    [ ]
    [ ]
    [ ] // Make a comparison of sExpectedText & sActualMessage
    [-] if sActualMessage == sExpectedText
    [ ]
    [ ]
    [ ]
    [ ] // If you want to look for a part of a message, try the following
    [ ] // iPos will return an integer if StrPos function finds sExpectedMessage inside of sActualMessage
    [ ] iPos = StrPos (sExpectedMessage, sActualMessage)

    </pre></Code>

  9. #9
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looking to extract a few lines of text instead of just one line from message box

    Hi,

    It sounds like the message is being displayed over a number of controls, for example two static textfields - is this the case? If so, you will need to get the caption of each control that is displaying the message and then concatenate the captions and verify that the message is correct.

    John.
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 12:47 AM.

Copyright BetaSoft Inc.