gah  just noticed typo in the below..   the method is of
course .text   not .txt as I've typed it

On Dec 9, 1:20 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
> it's possible the regular expression isn't matching ..
>
> The first thing I'd do to debug is remove the split  and just puts ksh
> to see what you 'have' in the string before you try to split it.
>
> eg  for debugging purposes try
>
> if $ie.div(:text, /Balance:/).exists?
>     ksh = $ie.d(:text, /Balance:/).txt
>     puts ksh
> end
>
> You could even add an else to the if  that did something like 'puts
> ksh div not found'
>
> That should tell you if it's findinging the target div, and if it is,
> what string is being extracted using that regular expression..
>
> That should tell you if it's finding what you want, and able to
> extract the right stuff into the string.  Then you can figure out how
> to split the string.
>
> -----
>  If this advice is way below your level of scripting/programming
> skill, then you need to be more specific when you say 'is not
> working'  in terms of what is actually happening, and what you've
> tried in terms of debugging.
>
>  (consider how you would feel if someone came to you to try and
> diagnose/fix/repro and issue and all you had to work with is "this is
> not working")
>
> --Chuck
>
> On Dec 9, 12:12 am, Divya <[EMAIL PROTECTED]> wrote:
>
>
>
> > Sir,
>
> > This is not working.
> > Kindly help me out on this.
> > thanks
> > divya
>
> > On Dec 5, 7:03 pm, Moochie <[EMAIL PROTECTED]> wrote:
>
> > >  if $ie.div(:text, /Balance:/).exists?
> > >     ksh = $ie.d(:text, /Balance:/).text.split(" ")
> > >     puts ksh[2]
> > > end
>
> > > On Dec 5, 4:51 am, Divya <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
> > > > View Source is like this:
>
> > > > <form  method="post" action="/xxx/xxx">
> > > >                         <div>
> > > >                         Sent to: nnnn-nnnnnn <br/>Amount: Ksh 
> > > > 100.00<br/>Date: 05/12/2008
> > > > 03:41 PM<br/>Message: <br/>Transaction ID: 73538<br/>Balance: Ksh
> > > > 7487.68
>
> > > > <br/>
>
> > > > I want to pick that amount Ksh 100 from the script.
>
> > > > Iam New to WATIR can please anyone help me in this regard.
>
> > > > Thanks
> > > > divi- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to