SPONSORS:






User Tag List

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

    Rational Robot Help

    Hi guys,

    hoping one of u might help me out...I have a simple question I guess but am not finding suitable solution to it...I am using Rational Robot for my testing.

    I have captured the text of an xml file in a variable.
    Now I have to search for specific text in that variable?
    any suggestions as to how to proceed. unfortunately the wild cards functionality in robot seems limited..or may be i ma not using it properly

    Any help is greatly appreciated..

    :-)

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

    Re: Rational Robot Help

    Hi

    I beleve the below code will solve ur problem

    Dim sString as string
    dim sFindText as string
    dim iposition as integer
    Dim resultString as string
    Dim sFirstPart as string
    Dim TotPosition as integer
    Dim iFinalPosition as integer



    sString = "India is my country "
    sFindText = "India"


    iposition = instr(sString,sFindText)
    msgbox "Position" &iposition

    TotPosition = iposition + len(sFindText)
    msgbox "Total position" &TotPosition

    sFirstPart = left(sString,TotPosition)
    msgbox "First Part" &sFirstPart

    iFinalPosition = TotPosition - iposition
    msgbox "Final Position" & iFinalPosition

    resultString = Right(sFirstPart,iFinalPosition+1)
    msgbox resultString

  3. #3
    Super Member SteveO's Avatar
    Join Date
    Jul 2004
    Location
    St. Louis, MO, USA
    Posts
    1,236
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Rational Robot Help

    If you're doing VU testing (you didn't specify GUI/VU) you can do a match statement against the variable.)

 

 

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.71%
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 04:10 PM.

Copyright BetaSoft Inc.