Re: [Wtr-general] url for link

2007-02-08 Thread Naga Harish Kanegolla
HI , Thank You it worked for that link. But I am having the links of the same kind with same contract_id=227. a href=# onclick=new Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227', {asynchronous:true, evalScripts:true}); return false;add a term/a a href=# onclick=new

[Wtr-general] how ie.div(:name = 'foo', :index = 2).click works?

2007-02-08 Thread Željko Filipin
How this works? ie.div(:name = 'foo', :index = 2).click I tried to find in Watir source how it is done, but I could not find it. Could somebody please point me to the right method? It would make sense to me if the argument was a hash. ie.div({:name = 'foo', :index = 2}).click I would like to

Re: [Wtr-general] url for link

2007-02-08 Thread Željko Filipin
ie.link(:html, /133/).click or ie.link(:html, /ajax_add_term\/133/).click -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] url for link

2007-02-08 Thread Naga Harish Kanegolla
Hi, I tried the two types but its giving error. data_entry.eb.rb:16: syntax error, unexpected tINTEGER, expecting ')' ie.link(:html,/ajax_add_term/131/).click So any other ideas, i tried all the combinations. but its getting error. Please help me.

Re: [Wtr-general] url for link

2007-02-08 Thread John Lolis
you missed typed it, type it exactly ie.link(:html, /ajax_add_term\/133/).click I think the \ / is allowing the forward slash to be used as a string and not as a special regex character. - Posted via Jive Forums

Re: [Wtr-general] url for link

2007-02-08 Thread Željko Filipin
This does not work? ie.link(:html, /133/).click -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] url for link

2007-02-08 Thread Željko Filipin
On 2/8/07, John Lolis [EMAIL PROTECTED] wrote: you missed typed it, type it exactly ie.link(:html, /ajax_add_term\/133/).click I think the \ / is allowing the forward slash to be used as a string and not as a special regex character. Exactly. -- Zeljko Filipin zeljkofilipin.com

Re: [Wtr-general] How do I connect to MS SQL 2005 using Ruby?

2007-02-08 Thread Nathan
Thanks, but that doesn't seem to work - the fetch_all method is not one of my choices, when I follow your first steps. I've successfully crashed ruby a couple of times already - so here's the ultimate problem. I desire to use my database to store actual files. These files are just text, but

Re: [Wtr-general] how ie.div(:name = 'foo', :index = 2).click works?

2007-02-08 Thread Nathan Christie
Zeljko, I'm not sure if this is what you are looking for, but here is the source for `click()` method in Watir: # This method clicks the active element. # raises: UnknownObjectException if the object is not found # ObjectDisabledException if the object is currently

Re: [Wtr-general] How do I connect to MS SQL 2005 using Ruby?

2007-02-08 Thread John Lolis
to add to that, you could do something like writing out to a text file thats just a bunch of insert statements... FUN! hrm, so many ideas now. - Posted via Jive Forums

Re: [Wtr-general] how ie.div(:name = 'foo', :index = 2).click works?

2007-02-08 Thread Željko Filipin
Hi Nathan, Thanks, but now I see I was not clear enough. I did not want how click method works (but, once more, thanks for your time). I wanted to know how are this method arguments handled: (:name = 'foo', :index = 2) It would make sense to me if it is a hash ({:name = 'foo', :index = 2})

Re: [Wtr-general] A Different WIN32OLERuntimeError (Ruby)

2007-02-08 Thread Nathan Christie
bbiker, Butting in is encouraged! So, basically, this command USED to work correctly for me in the past. Then something happened to my machine's configuration or something along those lines that made this stop working as it previously had. Now the only way this command works is if an instance

Re: [Wtr-general] How do I connect to MS SQL 2005 using Ruby?

2007-02-08 Thread John Lolis
heres my question to you. You want SQL to store your results, but you are having some issues with using MSSQL. This tells me in the future you will continue to have issues. Why not think around the problem? Export into a format that can be imported into MSSQL (there are a ton of formats and it

Re: [Wtr-general] renaming sheets in Excel

2007-02-08 Thread Nathan Christie
Shok, I'm sorry my example wouldn't work for you directly; I copied / pasted it out of some of my code, which does work, so I'm unsure why. Even though you are shelving it for a while, here is some more complete code of how my Excel test automation output works: (This automation actually

Re: [Wtr-general] How do I connect to MS SQL 2005 using Ruby?

2007-02-08 Thread Chris McMahon
On 2/8/07, Nathan [EMAIL PROTECTED] wrote: Thanks, but that doesn't seem to work - the fetch_all method is not one of my choices, when I follow your first steps. I've successfully crashed ruby a couple of times already - so here's the ultimate problem. I desire to use my database to store

Re: [Wtr-general] how ie.div(:name = 'foo', :index = 2).click works?

2007-02-08 Thread Charley Baker
Zeljko, The arguments are a hash. Ruby implicitly creates a hash when they're sent in. I'm not sure how it's not working for you. Try a simple example: require 'test/unit' class HashArgs Test::Unit::TestCase def test_args implicit_hash(:foo = 'bar', :other_foo = 'other_bar') end def

Re: [Wtr-general] how ie.div(:name = 'foo', :index = 2).click works?

2007-02-08 Thread Nathan Christie
Zeljko, Possibly this could help, I believe the `getObject( how, what, types, value=nil )` method could provide some more infromation to you with regards to this matter: =begin method= # This is the main method for finding objects on a web page. # # This method is used

[Wtr-general] How to take input from text file?

2007-02-08 Thread lianagi
Please help me make a script that is going to make a background check of all the persons in the list (filename:wanted.txt location c:\names) one by one. If the person doesn't have a record, it will enter the next name. If there's a record found, it will take 10 minutes before you can enter a

Re: [Wtr-general] How to take input from text file?

2007-02-08 Thread Nathan Christie
Maybe something like this: ie = IE.start( http://serverName/BackgroundChecker.ext; ) myFile = File.new( C:\\names\wanted.txt, r ) lineArray = IO.readlines( myFile.path ) lineArray.each{ |line| ie.text_field( :name, searchname ).set( line ) ie.button( :name, searchbutton ).click() #

Re: [Wtr-general] Identifying Last object using Index: -1 ???

2007-02-08 Thread Bret Pettichord
Lauren wrote: undefined method `button' for #Watir::Table:0xb698074 (NoMethodError) This sounds like a bug in 1.4 that is fixed in 1.5. What version are you using? Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] Identifying Last object using Index: -1 ???

2007-02-08 Thread Lauren
Wow Carl, What an awesome reply. I got code!! :) No doubt I'm still doing something wrong...I'm getting the following error when I run the code on my box though: ruby MSNTest.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load --

Re: [Wtr-general] Identifying Last object using Index: -1 ???

2007-02-08 Thread Charley Baker
Add a require for test unit at the top of the file: require 'test/unit' -c On 2/8/07, Lauren [EMAIL PROTECTED] wrote: Wow Carl, What an awesome reply. I got code!! :) No doubt I'm still doing something wrong...I'm getting the following error when I run the code on my box though: ruby

Re: [Wtr-general] how ie.div(:name = 'foo', :index = 2).click works?

2007-02-08 Thread Bret Pettichord
Like Charley said, the first form below is automatically understood by ruby to imply the second. It is a feature of Ruby and there is nothing special in the Watir library to make this happen. Bret ie.div(:name = 'foo', :index = 2).click ie.div({:name = 'foo', :index = 2}).click

Re: [Wtr-general] how ie.div(:name = 'foo', :index = 2).click works?

2007-02-08 Thread Charley Baker
Thought i remembered it from the Pickaxe book, guess I did. :) If you check out the bottom of the page on this link: http://www.rubycentral.com/book/tut_methods.html you'll find a reference to it - Collecting hash arguments. Passing curly braces to a method can get confused with blocks, so this

Re: [Wtr-general] How to take input from text file?

2007-02-08 Thread Richard Conroy
You are better off initially just putting the names into a names.rb file. Perhaps just declare a big array of names in another file and call it from your code. I know *why* you want to load from an external file, but in my experience its best to keep this stuff simple for testing. Once you are

Re: [Wtr-general] How to take input from text file?

2007-02-08 Thread Chris McMahon
I'll pick one nit here: lineArray = IO.readlines( myFile.path ) lineArray.each{ |line| For a very large myFile, you could have a problem holding lineArray in memory. A better choice might be myFile.path.each_line do |line| process line end ___

Re: [Wtr-general] How to take input from text file?

2007-02-08 Thread Charley Baker
well, I'm not sure i fully understand what you're looking for but you have some pseudocode: open list go through names move to next record if person has no name otherwise see if record is found if record is found then wait a long time#this seems odd, but not knowing your business domain,

Re: [Wtr-general] Identifying Last object using Index: -1 ???

2007-02-08 Thread Lauren
Bret, Thanks for your reply! HI am running Watir 1.4.1 - I wonder if that's the problem! I'll upgrade to 1.5 to see if that makes the difference. I know I've identified all of the possible attributes using the toolbar and viewing the source. I just couldn't figure out why it wouldn't

Re: [Wtr-general] How to take input from text file?

2007-02-08 Thread Charley Baker
Agreed, nice nit. :) You can pick at the file line by line or if using YAML as Richard mentioned, as a document by document separated in yml by dashes. -c On 2/8/07, Chris McMahon [EMAIL PROTECTED] wrote: I'll pick one nit here: lineArray = IO.readlines( myFile.path ) lineArray.each{

[Wtr-general] Problem with Logon popup window

2007-02-08 Thread Andrew
Hi, I need to click OK button in the Logon Popup with the following details: Window [004e0a92] Title [Connect to qaone.v51test.com] ClassName [#32770] Thread ID [0fcc] Process ID [0da0] Size [width=326, height=282] The problem is that Watir script is not executed, until

Re: [Wtr-general] Identifying Last object using Index: -1 ???

2007-02-08 Thread carl . l . shaulis
Lauren, I use watir 1.4.1 but reviewing 1.5.1. I had a situation today where .button(:name, ???).click did not work against our application. I changed it to ie.button(:caption , ???).click and it worked. Worth a try I guess. Good luck! Carl

Re: [Wtr-general] jscript_test.rb doesn't work in my machine.

2007-02-08 Thread Nathan Christie
Post more details, such as: Ruby version, Watir version, some of your [suspect] code, as well as the error output you get after execution. - Posted via Jive Forums

[Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer)

2007-02-08 Thread Lauren
I wanted to install watir 1.5. There are two versions of 1.5 with one-click installers. Both are giving me errors on several of the files and then completing the install with a install successful message. I previously had watir 1.4.1 installed but used the uninstall.exe prior to installing 1.5.

Re: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer)

2007-02-08 Thread Nathan Christie
Honestly, I would: uninstall Ruby remove physical Ruby directory reinstall Ruby from command prompt: `gem install watir` This is almost guaranteed to work, although I'm willing to be you could get away with just a `gem install watir` from the command prompt without uninstalling Ruby. For

Re: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer)

2007-02-08 Thread carl . l . shaulis
Lauren, I have concluded this week that working with the gems is the best way to install watir. There are a few unit tests that are not perfect in my environment, but gems are easier to manage. I recommend uninstalling and grab the lastest gem. Then execute gem install

Re: [Wtr-general] WIN32OLERuntimeError

2007-02-08 Thread Paul Rogers
I havent managed to catch up all on the threads in this message, but I was thinking exactly what Bret was Im also wondering if the com server has changed somehow, it internetExplorer7.application or something Im sure I used to know how to find out this stuff but it evades me today -

[Wtr-general] Send email from Watir script

2007-02-08 Thread Andrew
Hi, Is it possible to send an email with test results from Watir script? Thank you - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6493messageID=18447#18447 ___

Re: [Wtr-general] WIN32OLERuntimeError

2007-02-08 Thread Naga Harish Kanegolla
I too got the same problem. Getting WIN32OLERuntimeError . Yesterday i executed my scripts well but today morning when i come over here i got the problem, I have installed dotnet frame work and Windows Vista upgrade advisor, so is that any problem??

Re: [Wtr-general] WIN32OLERuntimeError

2007-02-08 Thread Naga Harish Kanegolla
Now I uninstalled the dot net frame work and Windows Vista upgrade advisor.But still i am getting the same problem, and even if i open the browser manually and i execute the script the problem is happening. Getting the error and its automatically opening the bulk of browsers. So is there any

Re: [Wtr-general] jscript_test.rb doesn't work in my machine.

2007-02-08 Thread barry
I think I found out why. I have IE 7.0 on my machine. It looks like the title of dialog box changes to Windows Internet Exploer. This may have caused the script to break. I ran this test in another machine with IE 6.0. It works just fine. I have Ruby 1.8.5 and Watir 1.4.1. When I ran

Re: [Wtr-general] Send email from Watir script

2007-02-08 Thread Walter Kruse
You'll need an SMTP server, try Free SMTP server from http://www.softstack.com/freesmtp.html require 'net/smtp' myMessage = END_OF_MESSAGE From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: My mail Message body here END_OF_MESSAGE Net::SMTP.start('localhost') do |smtp| smtp.send_message