I am having a weird issue. I hope someone can clear it up... this was never a problem before.

Sometimes I have need to start up Watir from the command line. So when I start IRB from c:\, then require 'watir', everything works fine. (Ruby and gems are installed under c:\ruby).

But now, if I start up irb in another directory, or on another drive, watir is not being found or something. I get a "load error" stating that
C:\current_directory\watir\IEDialog\Release\IEDialog.dll   could not be found.

When I try to attach to an IE window, I get the error "uninitialized constant IE".

Is this some kind of path error? I have never encountered this before. It always worked fine, no matter where I started it up.

Lonny Eachus
===========



[EMAIL PROTECTED] wrote:
Send Wtr-general mailing list submissions to
	wtr-general@rubyforge.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
	[EMAIL PROTECTED]

You can reach the person managing the list at
	[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wtr-general digest..."
  

Today's Topics: 1. Re: need help on Data Driven (Charley Baker) 2. Re: How to pick the last word in the sentence (marekj) 3. Re: How to pick the last word in the sentence (Paul Rogers) 4. Re: Selecting controls in a dialog box (Matt Berney) 5. Re: Selecting controls in a dialog box (Paul Rogers) 6. Re: Selecting controls in a dialog box (Bret Pettichord) 7. How to access the window.status pane (marty)



Subject:
Re: [Wtr-general] need help on Data Driven
From:
"Charley Baker" <[EMAIL PROTECTED]>
Date:
Tue, 10 Jul 2007 11:25:51 -0600
To:
wtr-general@rubyforge.org
To:
wtr-general@rubyforge.org

The error pretty much tells you the story. You're taking an array: category=worksheet.Range('a2:a4') ['Value']  and pushing it into a method that accepts a string. If you want the whole array to be a string then convert it to a string:
category=worksheet.Range('a2:a4') ['Value']

category.to_s

If that's not the intention, then grab whatever string you want and pass that on - cycle through the array, whatever.

-Charley

On 7/9/07, murali <[EMAIL PROTECTED]> wrote:
Hi every one,

           iam facing problem with the data driven. have glance of my code and let me know where i did mistake.

excel= WIN32OLE::new('excel.Application')
workbook=excel.Workbooks.Open ('D:\Documents and Settings\mmopur\Desktop\IPE Aut\test.xls')
worksheet=workbook.Worksheets(1)
worksheet.Select
excel ['Visible']
#worksheet.Range('a2') ['Value']
category=worksheet.Range ('a2:a4') ['Value']
line = '1'
while worksheet.Range("a#{line}")['Value']
   line.succ!

ie.text_field(:name,"ctl00$ContentPlaceHolder1$txtCategory").set(category)


when i run the script iam getting the errors as belo mentioned

c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3431:in `+': can't convert Array into S
ring (TypeError)
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3431:in `doKeyPress'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3427:in `each'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3427:in `doKeyPress'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3393:in `set'
        from D:/Documents and Settings/mmopur/Desktop/IPE Aut/datadriven.rb:59


plz look into that and do needful

Regards
Murali
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general




Subject:
Re: [Wtr-general] How to pick the last word in the sentence
From:
marekj <[EMAIL PROTECTED]>
Date:
Tue, 10 Jul 2007 12:38:16 -0500
To:
wtr-general@rubyforge.org
To:
wtr-general@rubyforge.org

Hm...how about this:

sentences =<<eof
some words and more words then some more words and the last one word in a sentence1.
Next sentence and more words and the last one word in a sentence2.
and here too
and then some more here
and last word of the last sentence.
eof
words = sentences.split # or add (' ') to make split on whitespace explicit.
last_word = words[-1] #last element in Array is your last word in a heredoc

take a look at String.split goodness.
http://www.ruby-doc.org/core/classes/String.html#M000818

marekj


On 7/9/07, sapna <[EMAIL PROTECTED]> wrote:
Hi All,

Pleas can you help me finding out the last word in the sentence displayed on the web page. Have look at the HTML snippet.

Regards
Sapna
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general




Subject:
Re: [Wtr-general] How to pick the last word in the sentence
From:
Paul Rogers <[EMAIL PROTECTED]>
Date:
Tue, 10 Jul 2007 12:00:19 -0600
To:
wtr-general@rubyforge.org
To:
wtr-general@rubyforge.org


I much prefer using
words = sentences.split # or add (' ') to make split on whitespace explicit.
last_word = words.last


----- Original Message -----
From: marekj <[EMAIL PROTECTED]>
Date: Tuesday, July 10, 2007 11:40 am
Subject: Re: [Wtr-general] How to pick the last word in the sentence
To: wtr-general@rubyforge.org

> Hm...how about this:
>
> sentences =<<eof
> some words and more words then some more words and the last one
> word in a
> sentence1.
> Next sentence and more words and the last one word in a sentence2.
> and here too
> and then some more here
> and last word of the last sentence.
> eof
> words = sentences.split # or add (' ') to make split on
> whitespace explicit.
> last_word = words[-1] #last element in Array is your last word
> in a heredoc
>
> take a look at String.split goodness.
> http://www.ruby-doc.org/core/classes/String.html#M000818
>
> marekj
>
>
> On 7/9/07, sapna <[EMAIL PROTECTED]> wrote:
> >
> > Hi All,
> >
> > Pleas can you help me finding out the last word in the
> sentence displayed
> > on the web page. Have look at the HTML snippet.
> >
> > Regards
> > Sapna
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>


Subject:
Re: [Wtr-general] Selecting controls in a dialog box
From:
Matt Berney <[EMAIL PROTECTED]>
Date:
Tue, 10 Jul 2007 13:06:33 CDT
To:
wtr-general@rubyforge.org
To:
wtr-general@rubyforge.org

The default Watir::IE.attach method doesn't seem to work because this is a dialog.  I can use the autoit.WinWait() method to get the window handle.  But, access the controls on the dialog seems elusive.  Any help is greatly appreciated.

irb(main):005:0> d = Watir::IE.attach(:title,/Web Page Dialog/)
Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with
 title of (?-mix:Web Page Dialog)
        from d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:16
42:in `attach_browser_window'
        from d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:15
19:in `_attach_init'
        from d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:15
13:in `attach'
        from (irb):5

irb(main):018:0> autoit = WIN32OLE.new('AutoItX3.Control')
=> #<WIN32OLE:0x9f0cb30>
irb(main):019:0> autoit.WinWait "Web Page Dialog", "", 1
=> 1

  



Subject:
Re: [Wtr-general] Selecting controls in a dialog box
From:
Paul Rogers <[EMAIL PROTECTED]>
Date:
Tue, 10 Jul 2007 12:12:58 -0600
To:
wtr-general@rubyforge.org
To:
wtr-general@rubyforge.org

have you looked at the modal_dialog stuff in watir? Ive never used it so cant help you much, but its there.

----- Original Message -----
From: Matt Berney <[EMAIL PROTECTED]>
Date: Tuesday, July 10, 2007 12:10 pm
Subject: Re: [Wtr-general] Selecting controls in a dialog box
To: wtr-general@rubyforge.org

> The default Watir::IE.attach method doesn't seem to work because
> this is a dialog.  I can use the autoit.WinWait() method to
> get the window handle.  But, access the controls on the
> dialog seems elusive.  Any help is greatly appreciated.
>
> irb(main):005:0> d = Watir::IE.attach(:title,/Web Page Dialog/)
> Watir::Exception::NoMatchingWindowFoundException: Unable to
> locate a window with
>  title of (?-mix:Web Page Dialog)
>         from
> d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:16
> 42:in `attach_browser_window'
>         from
> d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:15
> 19:in `_attach_init'
>         from
> d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:15
> 13:in `attach'
>         from (irb):5
>
> irb(main):018:0> autoit = WIN32OLE.new('AutoItX3.Control')
> => #<WIN32OLE:0x9f0cb30>
> irb(main):019:0> autoit.WinWait "Web Page Dialog", "", 1
> => 1
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>


Subject:
Re: [Wtr-general] Selecting controls in a dialog box
From:
Bret Pettichord <[EMAIL PROTECTED]>
Date:
Tue, 10 Jul 2007 14:29:20 -0500
To:
wtr-general@rubyforge.org
To:
wtr-general@rubyforge.org

Paul Rogers wrote:
have you looked at the modal_dialog stuff in watir? Ive never used it so cant help you much, but its there.
+1




Subject:
[Wtr-general] How to access the window.status pane
From:
marty <[EMAIL PROTECTED]>
Date:
Tue, 10 Jul 2007 15:04:39 CDT
To:
wtr-general@rubyforge.org
To:
wtr-general@rubyforge.org

We have some code that on a MouseOver sets the window.status field. Is there a way to access this in Watir?

HTML Code:

<td class='fnt' valign="bottom">
<a href="" class="moz-txt-link-rfc2396E" href="_javascript_:show_calendar('frmDateRange.txtbegin_date');">"_javascript_:show_calendar('frmDateRange.txtbegin_date');"  ><img src="" width=34 height=21 border=0></a>
</td>

  

_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to