Re: [Wtr-general] Error when loading iframe

2007-05-03 Thread John
Thank you very much!
Downloading the latest development build solved this issue and it now works 
fine.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Wtr-general Digest, Vol 42, Issue 3

2007-05-03 Thread Imran Hussain
Hi Charley,
 
Thanks for the info but it still doesn't work, I now get the following error:
 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `method_missing': focus 
(WIN32OLERuntimeError)OLE error code:800A083E in htmlfile  Can't move 
focus to the control because it is invisible, not enabled, or of a type that 
does not accept the focus.HRESULT error code:0x80020009  Exception 
occurred.   from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `set' 
Thanks,
Imran



 From: [EMAIL PROTECTED] Subject: Wtr-general Digest, Vol 42, Issue 3 To: 
 wtr-general@rubyforge.org Date: Wed, 2 May 2007 20:19:00 -0400  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: How to identify the nth 
 instance of a div? (Jason) 2. 'Unable to locate object' problem (Imran 
 Hussain) 3. Re: 'Unable to locate object' problem (Charley Baker) 4. Re: 
 How to identify the nth instance of a div? (Jeff Fry) 5. Re: Error when 
 loading iframe (Suman Goel) 6. playing with FireWatir on OSX (Chris 
 McMahon) 7. problem filling text_field - validation fails (Timm Mason)   
 --  
 Message: 1 Date: Wed, 02 May 2007 10:27:48 CDT From: Jason [EMAIL 
 PROTECTED] Subject: Re: [Wtr-general] How to identify the nth instance of a 
 div? To: wtr-general@rubyforge.org Message-ID: [EMAIL PROTECTED]  
 Content-Type: text/plain; charset=ISO-8859-1   You can also identify 
 elements using multiple attributes, for example :class and :index 
 :brbrie.div(:class =gt; #39;contentItem#39;, :index =gt; 3)nbsp; # 
 access the 3rd div with a class of #39Perfect - that's exactly what 
 I was after. Must have missed that in my tutorials and readings. Lovely.   
 --  Message: 2 Date: Wed, 2 May 2007 17:04:45 
 +0100 From: Imran Hussain [EMAIL PROTECTED] Subject: [Wtr-general] 
 'Unable to locate object' problem To: wtr-general@rubyforge.org Cc: 
 [EMAIL PROTECTED] [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] 
 Content-Type: text/plain; charset=iso-8859-1  Hi,  'Unable to locate 
 object' problem  When running the following show_all_objects command, I 
 get;  rb(main):016:0 ie.show_all_objects---Objects in page 
 - HTML Document name= id=SN_NOTESSFrame src=textarea 
 name=SN_NOTESSText id= value=  How do I write to this object? do I use 
 this:  ie.text_field(:id ,SN_NOTESSFrame).set(TESTING 1234)  Is this 
 within a frame?? This doesn't seem to be working  can someone help?  
 Thanks,Imran -- next part -- An HTML attachment was 
 scrubbed... URL: 
 http://rubyforge.org/pipermail/wtr-general/attachments/20070502/57205157/attachment-0001.html
--  Message: 3 Date: Wed, 2 May 2007 
 10:19:26 -0600 From: Charley Baker [EMAIL PROTECTED] Subject: Re: 
 [Wtr-general] 'Unable to locate object' problem To: 
 wtr-general@rubyforge.org Message-ID: [EMAIL PROTECTED] Content-Type: 
 text/plain; charset=iso-8859-1  You're trying to write to what appears to 
 be a frame not the textarea.  ie.text_field(:name, 
 'SN_NOTESSText').set('this should work')-Charley   On 5/2/07, 
 Imran Hussain [EMAIL PROTECTED] wrote:   Hi,   'Unable to locate 
 object' problem   When running the following show_all_objects command, I 
 get;   rb(main):016:0 ie.show_all_objects  ---Objects in page 
 -  HTML Document name= id=SN_NOTESSFrame src=  textarea 
 name=SN_NOTESSText id= value=   How do I write to this object? do I use 
 this:   ie.text_field(:id ,SN_NOTESSFrame).set(TESTING 1234)   Is 
 this within a frame??  This doesn't seem to be working  can someone 
 help?   Thanks,  Imran 
 ___  Wtr-general mailing list 
  Wtr-general@rubyforge.org  
 http://rubyforge.org/mailman/listinfo/wtr-general  -- next 
 part -- An HTML attachment was scrubbed... URL: 
 http://rubyforge.org/pipermail/wtr-general/attachments/20070502/5bbc8640/attachment-0001.html
--  Message: 4 Date: Wed, 2 May 2007 
 10:42:09 -0700 From: Jeff Fry [EMAIL PROTECTED] Subject: Re: 
 [Wtr-general] How to identify the nth instance of a div? To: 
 wtr-general@rubyforge.org Message-ID: [EMAIL PROTECTED] Content-Type: 
 text/plain; charset=iso-8859-1  On 5/2/07, Jason [EMAIL PROTECTED] 
 wrote:Perfect - that's exactly what I was after.   Cool.  Must 
 have missed that in my tutorials and readings. Lovely.   :index is in the 
 rdoc already, but :class and multiple attribute support aren't 

Re: [Wtr-general] playing with FireWatir on OSX

2007-05-03 Thread Chris McMahon
On 5/3/07, Angrez Singh [EMAIL PROTECTED] wrote:
 Hi Chris,

 You might want to have a look at this for installing FireWatir or MAC OS X.
 http://crasch.livejournal.com/550521.html

 According to the troubleshooting section of this article, the error you are
 getting is because of incorrect xpi.

Ah, I didn't read that far, thanks.

I've tried both Darwin xpi files and the Linux xpi file from
http://people.mozilla.com/~davel/jssh/.  The earlier Darwin one fails
to open port 9997 at all; the later Darwin one opens port 9997, but
doesn't seem to communicate; the Linux one appears in the FF Tools
menu, but I can't seem to activate it-- it's UI won't let me click
OK, although it will let me click Cancel.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] playing with FireWatir on OSX

2007-05-03 Thread Angrez Singh

Hi Chris,

Did you tried the XPI at
http://alephzarro.com/blog/2007/03/12/jssh-for-firefox-on-linux-because-firewatir-loves-it
Its an XPI for linux but seems to work on Mac OS also (according the link i
sent you in last mail)

Regards,
Angrez

file:///D:/installations/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.2/
On 5/3/07, Chris McMahon [EMAIL PROTECTED] wrote:


On 5/3/07, Angrez Singh [EMAIL PROTECTED] wrote:
 Hi Chris,

 You might want to have a look at this for installing FireWatir or MAC OS
X.
 http://crasch.livejournal.com/550521.html

 According to the troubleshooting section of this article, the error you
are
 getting is because of incorrect xpi.

Ah, I didn't read that far, thanks.

I've tried both Darwin xpi files and the Linux xpi file from
http://people.mozilla.com/~davel/jssh/.  The earlier Darwin one fails
to open port 9997 at all; the later Darwin one opens port 9997, but
doesn't seem to communicate; the Linux one appears in the FF Tools
menu, but I can't seem to activate it-- it's UI won't let me click
OK, although it will let me click Cancel.
___
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

Re: [Wtr-general] playing with FireWatir on OSX

2007-05-03 Thread Chris McMahon
On 5/3/07, Angrez Singh [EMAIL PROTECTED] wrote:
 Hi Chris,

 Did you tried the XPI at
 http://alephzarro.com/blog/2007/03/12/jssh-for-firefox-on-linux-because-firewatir-loves-it
 Its an XPI for linux but seems to work on Mac OS also (according the link i
 sent you in last mail)

Yay!  That one works.  Interestingly, it has the same name as the one
from mozilla, but it behaves differently.
-Chris
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] can you help why ODBC connection failure worked one time and not working no

2007-05-03 Thread Venkata
helo all,

   I am trying to connect to SQL server through ODBC. 

Steps 
1) I alreday have ODBC available.
2) Created a DSN and tested with Test connection there.
3) verified C:\IRBmain Require 'ODBC'  true.

4) I created a scripts according to the examples.


require 'watir'
require 'ODBC'
include 'watir'
require 'Driver'

#~ # Connect to the Databse 
conn = ODBC::connect('Myvalue','user','password')

#~ # get the from the table 
 h = conn.run(SELECT * FROM tableName where ssn = 'ssn')


#~ # get the ecah field value and prints to the log.
 h.each do |row|
 puts row
 end


it worked and retrieved the values one time.

Now it is not idetifying the ODBC anymore. i am getting Load error.

ruby DBconnect.rb
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/ODBC.so: 127: The specified 
procedure could not be found.  
 - Init_ODBC (LoadError)
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/ODBC.so  from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from DBconnect.rb:2




Please can you help me.

do i have to disconnect? if it is please tell me how May be

ODBC::disconnect ?

Thanks,
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Finding the name of objects

2007-05-03 Thread Chris McMahon
The Developer Toolbar is great
http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038displaylang=en

Also, Watir has nice show_all_* methods we like to use from IRB.
Using the flash method from IRB is also recommended.

And eventually, you even get pretty good at reading the HTML.
-Chris

On 5/3/07, Ken [EMAIL PROTECTED] wrote:
 I just got started with this and am trying to write a simple script to get my 
 feet wet.  I was following the googlesearch.rb case that is provided.  My 
 question is how do you find the name of the object that you want to perform 
 an action with?  For example:

 ie.text_field(:name, q).set(pickaxe) # q is the name of the search field

 How do you know that q is the name of the search field?  I viewed the source 
 of the page and eventually found the field named q but it was not obvious or 
 easy.  It was so murky that if I didnt know already that the fields name was 
 q I never would have found it.  Is there a simple way to identify a list box, 
 text field, radio button...etc?

 Thanks.
 ___
 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


[Wtr-general] FireWatir not finding buttons by id

2007-05-03 Thread Chris McMahon
Hi...

Seems like this script should work, but I'm getting

FireWatir::Exception::UnknownObjectException: Unable to locate object,
using id and id value

for both the buttons.   I put the sleeps in in case it was a
page-rendering issue, but I don't think that it is.
(BTW, feel free to add yourself, log in and try the rest of the script
if you want.)

###

require 'rubygems'
require 'firewatir'
require 'test/unit'
require 'firewatir/testUnitAddons'
include FireWatir

ff = FireWatir::Firefox.new()
ff.goto(http://www.socialtext.net/stoss/index.cgi?mcmahon_test;)

sleep 2

#DOESN'T FIND THIS BUTTON
ff.button(:id,'st-login-to-edit-button-link')

ff.text_field(:id, 'username').set('[EMAIL PROTECTED]')
ff.text_field(:id, 'password').set('mypass')
ff.button(:value, 'Log in').click

sleep 2

#DOESN'T FIND THIS BUTTON EITHER
ff.button(:id,st-edit-button-link).click

ff.text_field(:id,'wikiwyg_wikitext_textarea').set('*test data*')
ff.button(:id,'st-save-button-link').click
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general