Re: [OpenSTA-users] Need help with LOAD RESPONSE_INFO
Brought to you by:
dansut
From: Ranjit S. <jc...@ho...> - 2003-01-30 04:10:45
|
I am glad things worked out for you, Brenie! Thanks -Ranjit >From: "Bernie Velivis" <Ve...@ix...> >Reply-To: ope...@li... >To: <ope...@li...> >Subject: Re: [OpenSTA-users] Need help with LOAD RESPONSE_INFO >Date: Wed, 29 Jan 2003 09:16:51 -0500 > >Ranjit, > >Thanks so much for taking the time to reply. I can get the string directly >from the HTML element using LOAD RESPONSE_INFO BODY ON 6 INTO >CreateTest_id, WITH "HTML(0)/BODY(1):ATTRIBUTE:onload(7)[41,22]. This >method is more concise then using multiple statements to pick out a >substring. The one failing it has is that I have to COUNT properly to get >it >to work! (lol) Really, I will have hundreds of these in a script and I was >looking for a single solution based on using delimiters as modifies to the >LOAD_RESPONSE_INFO command that would be less prone to human error (mine!) >when implemented. > >As I look forward in my inbox, it appears that Raul Soriano has provided >the >example I was looking for. Thanks again for your support. > >-Bernie > >----- Original Message ----- >From: "Ranjit Shewale" <jc...@ho...> >To: <ope...@li...> >Sent: Tuesday, January 28, 2003 10:59 PM >Subject: Re: [OpenSTA-users] Need help with LOAD RESPONSE_INFO > > > > Bernie, once you know you always get "<space>'BLAHATiOmlCxOIWKotmgNg" >all > > you have to do is perform string operations on it. Try using Extract and > > Locate functions once you get the above mentioned string into a variable > > > > Thanks > > -Ranjit > > > > >From: "Bernie Velivis" <Ve...@ix...> > > >Reply-To: ope...@li... > > >To: <ope...@li...> > > >Subject: [OpenSTA-users] Need help with LOAD RESPONSE_INFO > > >Date: Tue, 28 Jan 2003 16:54:00 -0500 > > > > > >Hi Folks, > > > > > >I have scripts that require a LOT of parsing responses for use in > > >subsequent > > >GETS or POSTS. > > >The text I want is embedded in a larger string that looks like > > > > > >onload: javascript:componentSetup('createtest', >'kougATiOmlCxOIWKotmgNg') > > > > > >The command > > > > > >LOAD RESPONSE_INFO BODY ON 6 & > > > INTO CreateTest_id & > > > ,WITH "HTML(0)/BODY(1):ATTRIBUTE:onload(7)[41,22]" ! This gets >the > > >substring that starts at 41, and is 22 chars long. > > > > > >works perfectly and sets CreateTest_id = kougATiOmlCxOIWKotmgNg > > > > > >The problem is that I have many of these to parse, and they all look a > > >little different, for example another string to parse might look like > > > > > >onload: >javascript:componentSetup('someothervariablenamewhichismuchlarger', > > >'BLAHATiOmlCxOIWKotmgNg') > > > > > >They all have two things in common. > > >1) The desired sub-string is between the delimiters > > ><comma><space><singlequote> and <singlequote> > > >2) The sub-string is always 22 chars long and the main string ends with >the > > >sub-string + <singlequote><rightParen> > > > > > >I tried > > > > > > LOAD RESPONSE_INFO BODY ON 6 & > > > INTO CreateTest_id & > > > ,WITH "HTML(0)/BODY(1):ATTRIBUTE:onload(7)[' \'',22]" > > > > > > but it gives:<space>'BLAHATiOmlCxOIWKotmgNg instead of > > >BLAHATiOmlCxOIWKotmgNg > > > > > >Any ideas on a syntax I can use to parse a string of any length without > > >specifying the starting offset and length of the substring? > > > > > >Thanks! > > >Bernie > > > > > > > > > > > > > > > > > > > > > > > >------------------------------------------------------- > > >This SF.NET email is sponsored by: > > >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > >http://www.vasoftware.com > > >-- > > >OpenSTA-users mailing list Ope...@li... > > >https://lists.sourceforge.net/lists/listinfo/opensta-users > > > > > > _________________________________________________________________ > > The new MSN 8: advanced junk mail protection and 2 months FREE* > > http://join.msn.com/?page=features/junkmail > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > http://www.vasoftware.com > > -- > > OpenSTA-users mailing list Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opensta-users > > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >http://www.vasoftware.com >-- >OpenSTA-users mailing list Ope...@li... >https://lists.sourceforge.net/lists/listinfo/opensta-users _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail |