you need to put it in quotes
@ie.div(:id, 'db_top').span(:id, 'db_data').flash

Paul

On Fri, Nov 14, 2008 at 2:17 PM, maven999 <[EMAIL PROTECTED]> wrote:

>
> Hi all,
>
> I'm trying to grab and print the text 'db_ABC' from the browser page.
> On the page, the text is "Connected to: Current Database (db_ABC)".
> The html code is:
>
> <div id="db_top" style="float: right; text-align: right; padding-
> right: 10px;">
> <span id="db_data">
> Connected to:
> <b>Current Database</b>
> (db_ABC)
> <br/>
> <i>Created:</i>
> Fri, 14 Nov 2008 14:37:31 GMT
> </span>
>
> When I try:
> @ie.div(:id, db_top).span(:id, db_data).flash
>
> I get the error: undefined local variable or method `db_top' for
> #<Object:0x27bf9ec> (NameError)
>
> Turns out I cannot find the element 'db_ABC' via the IE Developer
> toolbar for some reason.
>
> So instead when I try:
> @dbname = @ie.div(:id, db_top).span(:text, /idb_/).to_s
> puts "currently connected to database " [EMAIL PROTECTED]
>
> I still get the same NameError. Any help is much appreciated.
> Thanks!
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
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