Re: [Wtr-general] `+': can't convert nil into String (TypeError)- how to solve this error

2007-07-12 Thread Charley Baker
Hi, In your login method in commonipe.rb on line 5, you're doing some sort of concatenation of a nil to a string, likely something like this: puts my value is: + foo foo is nil while you're running your test for whatever reason. You need to figure out why you're getting nil if you're not

Re: [Wtr-general] Query in windows-pr,win32-process and Rspec

2007-07-12 Thread Charley Baker
windows-pr - win32 constants used by win32-process. win32-process - watir is now using Process.create in this library, see the following JIRA ticket for more details: http://jira.openqa.org/browse/WTR-150 Rspec - Behavior driven development framework, a quick google search on BDD and Dave Astels

Re: [Wtr-general] Selecting controls in a dialog box

2007-07-11 Thread Charley Baker
A quick check will tell you if it's a modal dialog. Open ie to the page that launches the dialog. Open irb in a command window. In irb type: require 'watir' ie = Watir::IE.attach(:title, /some part of the ie title/) Launch the dialog. Back in irb type: puts ie.modal_dialog.title If you get a

Re: [Wtr-general] need help on Data Driven

2007-07-10 Thread Charley Baker
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

Re: [Wtr-general] Having problems figuring out what to click

2007-07-07 Thread Charley Baker
Hi Matt, You need to access the cell, the onclick event is attached to the cell, not the row. This should work: $ie.table(:id,'table1')[1][1].fire_event('onClick') table with id of table1, first row, first cell. -Charley On 7/6/07, Matt Berney [EMAIL PROTECTED] wrote: I have been using

Re: [Wtr-general] $ie.button replacing with $ie.b?

2007-07-07 Thread Charley Baker
I'm not quite sure why you'd want to do that, maybe you could explain it. Here are a couple of random possibilities: 1. use the string and eval it, makes the code less readable but there are some good uses for this: b = button eval(puts $ie.#{b}(:index, 1)) 2.wrap the code in a method, cleaner

Re: [Wtr-general] Modal Dialog/Vista -- undefined method `hwnd'

2007-07-06 Thread Charley Baker
Modal dialogs aren't part of a frame, they're generated and owned by ie, so this line: ie2.frame(ContentFrame).modal_dialog.text_field(:id, 'FileUploader').set('C:\Users\Public\Pictures\Sample Pictures\Dock.jpg') should read: ie2.modal_dialog.text_field(:id,

Re: [Wtr-general] Reporting suggestions?

2007-07-06 Thread Charley Baker
I'd suggest using ci-reporter - http://rubyforge.org/projects/caldersphere/- for your main test reporting, though honestly I've got little experience with it and am still using it's predecessor test-unit report. For your puts statements why not use ruby's logger or log4r instead? Dump your puts

Re: [Wtr-general] ruby2exe and autoit

2007-07-05 Thread Charley Baker
You need to register AutoIt. In a command window, navigate to the directory where you've put AutoIt and type: regsvr32 AutoItX3.dll -Charley On 7/5/07, mihai [EMAIL PROTECTED] wrote: i have a script in wich im using an autoit control: $autoit= WIN32OLE.new(AutoItX3.Control) i want to test my

Re: [Wtr-general] Receiving extensive warning messages while trying to run Watir Ruby scripts

2007-07-05 Thread Charley Baker
It's likely that you have multiple Watir requires with different casing somewhere in your files: require 'watir' and require 'Watir' That'd be my first guess. Check your scripts for requires. -Charley On 7/4/07, Lavanya Lakshman [EMAIL PROTECTED] wrote: I have installed 1.8.5 version of

Re: [Wtr-general] How to detect installed version of Watir

2007-07-05 Thread Charley Baker
Open a command prompt, type: ruby -e require 'watir'; puts Watir::IE::VERSION; -Charley On 7/5/07, Nadine Whitfield [EMAIL PROTECTED] wrote: Hi- there may already be a thread about this, but I could not find it. I recently used the Windows .exe (rather than Gem) to install Watir on my

Re: [Wtr-general] Embedded Browser and/or SmartCleint

2007-07-05 Thread Charley Baker
My guess is that you could attach to the embedded browser if you can get a handle to the ie instance and then attach to the handle using ie.attach(:hwnd, handle). You may be able to get a handle by navigating through windows, simalarly to the way it's set up in Watir by using Shell.Application,

Re: [Wtr-general] CAN BE CLICK LINK ASSOCIATED WITH AN IMAGE

2007-07-02 Thread Charley Baker
Well, you learn something new every day. I haven't worked with labels, :for is a supported how for labels. Teach me to answer a question without trying it out. :) The :after? tag doesn't appear to apply to input elements, buttons, text_fields, frames. Add a JIRA ticket if you'd like to see it

Re: [Wtr-general] Possible to run scripts when not logged in?

2007-06-29 Thread Charley Baker
CruiseControl is a good way to go if you're interested in setting up a continuous integration server this is a good way to go. This is the ruby version: http://rubyforge.org/projects/cruisecontrolrb/ -Charley On 6/29/07, Justin [EMAIL PROTECTED] wrote: I am considering using Watir to create a

Re: [Wtr-general] CAN BE CLICK LINK ASSOCIATED WITH AN IMAGE

2007-06-28 Thread Charley Baker
What's :for? It's not part of Watir. Have you tried by :name and/or :id? On 6/28/07, Jason [EMAIL PROTECTED] wrote: ie.link(:after?, ie.image(:id, 'foo')).click Does / can this apply to anything other than 'links' or 'images'? i.e. I attempted this: ie.text_field(:after?, ie.label(:for,

Re: [Wtr-general] return table element content type value

2007-06-27 Thread Charley Baker
There is no type for an html element. They are all strings. You can certainly add your own validations on the strings you get back, regexes may help: http://www.rubycentral.com/book/tut_stdtypes.html -Charley On 6/27/07, Max Russell [EMAIL PROTECTED] wrote: Is there a way to return the

Re: [Wtr-general] ci_reporter usage of xml files

2007-06-27 Thread Charley Baker
I haven't had a chance to work with ci_reporter though I hope to if I ever get some free time. My assumption is that they're junit style reports which can be consumed by a dashboard. We're using CruiseControl now for continuous builds and reporting results, there's a recent ruby port on

Re: [Wtr-general] iterate thru forum

2007-06-20 Thread Charley Baker
Hard to tell without seeing an html snippet of what you're trying to test. Now that you have the table, I assume you want to iterate through rows. table.rows.each do |row| do something with the row end -Charley On 6/18/07, B Smith [EMAIL PROTECTED] wrote: I got this far on my own table

Re: [Wtr-general] frames and url()

2007-06-19 Thread Charley Baker
I just added url to frame, you might want to download the latest code. Check the wiki faq for installing building the latest gem from source. -c On 6/19/07, Chong Jiang [EMAIL PROTECTED] wrote: Hello all, Sorry, I do not know how to append this message to my previous one in threaded form.

Re: [Wtr-general] Load Error

2007-06-19 Thread Charley Baker
require_gem 'watir' or gem 'watir' Try the same in irb. It may be due to the ruby update. I haven't tried it due to my dependency on modal dialog support. -c On 6/19/07, Max Russell [EMAIL PROTECTED] wrote: My original question was: On 6/15/07, Max Russell [EMAIL PROTECTED] wrote:

Re: [Wtr-general] Watir no longer always waits for all frames to load

2007-06-19 Thread Charley Baker
wait_until is a cleaner method to invoke. sleeps are too error prone, wait_until a specific control exists. I removed the http error checks around that time and there have been some changes in the frames handling. -c On 6/19/07, Brown, David [EMAIL PROTECTED] wrote: Gems prior to 1.5.1.1166

Re: [Wtr-general] get all rows from table in webpage

2007-06-19 Thread Charley Baker
Try this: t = ie.table(:index, 5) t.each { |row| row.to_s } Take a look at the user guide and unit tests for how to use Watir. -c On 6/19/07, B Smith [EMAIL PROTECTED] wrote: this doesn't work v_1 = Array.new ie.table(:index,5).rows.each_with_index do |row, i| end

Re: [Wtr-general] Our contribution to Watir

2007-06-16 Thread Charley Baker
It's great to have user contributions, I haven't had a chance to look at it yet, but will soon. Instead of adding it to a jira ticket, you should add it to the user contribution area of the wiki on openqa. http://wiki.openqa.org/display/WTR/Contributions -Charley On 6/17/07, Jeff Fry [EMAIL

Re: [Wtr-general] OT: ruby/eclipse question

2007-06-13 Thread Charley Baker
Hey Jeff, You can create a .project file at the root of your project directory and put this in it - replace project_name with your project name. ?xml version=1.0 encoding=UTF-8? projectDescription nameproject_name/name comment/comment projects /projects buildSpec

Re: [Wtr-general] sintax error

2007-06-09 Thread Charley Baker
Change equal? to eql? or == and it 'll work. equal? compares object ids, eql? and == compare values. -Charley On 6/9/07, mihai [EMAIL PROTECTED] wrote: i search with a script all buttons on a page; if the name of a button is btnG then it must puts OK else NO the code is: $ie.buttons.each do

Re: [Wtr-general] Scheduler

2007-06-08 Thread Charley Baker
You might want to ask this on the Selenium forum. On 6/8/07, Jet Liu [EMAIL PROTECTED] wrote: Hi, When I set up my schedule using something like C:\Program Files\Mozilla Firefox\firefox.exe -chrome chrome://selenium-ide/content/selenium/TestRunner.html?baseURL=

Re: [Wtr-general] Trouble selecting list box item - Any suggestions

2007-06-08 Thread Charley Baker
Sure it's pretty easy. The sizes all show up in divs with size swatch id tags, you can see them all with the IE dev toolbar. Sold out sizes will have a div class of soldOut, so look out for those. Watir 1.5 is coming out soon, until then, you can install a prebuilt development gem :

[Wtr-general] test

2007-06-08 Thread charley . baker
test ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] NoMethodError :Undefined method Process_id for 1808:Fixnum

2007-06-08 Thread Charley Baker
You might try updating the win32-process gem. Latest version is 0.5.2. There was a similar posting on the win32-process list on rubyforge. That may or may not resolve the issue. -Charley On 6/8/07, Simba [EMAIL PROTECTED] wrote: When i Run Below is code in IRB ,its throwinf error require

Re: [Wtr-general] Best Combination of Ruby and Watir

2007-06-08 Thread Charley Baker
modal_dialog only works for 1.8.2 currently since that's the version of Ruby that the win32ole.so library was compiled against. Bret added an error if you try to use this feature in newer versions of Ruby. If you need modal_dialog, you're limited to 1.8.2. -c On 6/8/07, Jeff Fry [EMAIL

Re: [Wtr-general] Trouble selecting list box item - Any suggestions

2007-06-07 Thread Charley Baker
Norris, This will work with Watir 1.5: ie.select_list(:id, 'qtyDropDown').option(:value, '5').select Send me an email, I'm curious to hear what you guys are doing and glad to see you coming out to mailing lists. -Charley On 6/7/07, Chris McMahon [EMAIL PROTECTED] wrote: On 6/7/07, Norris

Re: [Wtr-general] Script failing today, but worked yesterday?

2007-05-31 Thread Charley Baker
No idea what's happening without the code, or some reference point. Please post some snippet of code at least, only thing I can tell from this is that there's some problem when you're calling ie.goto. If you haven't changed anything then perhaps the network is wonky or the developers changed

Re: [Wtr-general] instantiate a class that inherits from Test::Unit

2007-05-30 Thread Charley Baker
Hi Aidy, You can mix in the assertions if that's all you're looking for: On 5/30/07, aidy lewis [EMAIL PROTECTED] wrote: #Hi #Is it possible to instantiate a class that inherits from Test::Unit require 'test\unit\assertions' class Login # Test::Unit::TestCase include

Re: [Wtr-general] Basic accessibility testing with Watir and RAAKT...

2007-05-25 Thread Charley Baker
It does look really cool. Unfortunately hpricot (a required dependency) dumps out with a Segmentation fault with Ruby 1.8.2. Looks like it only works with Ruby 1.8.5 and above. Bummer. On 5/25/07, Chris McMahon [EMAIL PROTECTED] wrote: The tool is called Raakt (Ruby Accessibility Analysis

Re: [Wtr-general] RDOC - Help determining what needs documentation

2007-05-25 Thread Charley Baker
I updated the :action and :method info. I'll take a look at the chart which is rather interesting, useful and may point out some discrepancies. -c On 5/25/07, Bret Pettichord [EMAIL PROTECTED] wrote: Jeff Fry wrote: Hey y'all, I'm resending these in the hopes of getting info from folks who

Re: [Wtr-general] want to enter URL manualy

2007-05-24 Thread Charley Baker
Hi Shalini, There shouldn't be a need to use $ie.wait $ie = IE.new # creates a new browser window Now you can enter your url manually if you want. How is this not working? -Charley On 5/24/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: Hi all, I want to enter URL in address bar of my

Re: [Wtr-general] Unable to a get a handle of secondary popup window

2007-05-23 Thread Charley Baker
There have been a lot of posts in the past day on the File Download dialog using AutoIt, take a look at the archives: http://www.mail-archive.com/wtr-general%40rubyforge.org/ As far as step 4, I'd suggest turning it off in IE. Internet Options Advanced Notify when downloads complete. I haven't

Re: [Wtr-general] The test case should be failed, but it is not

2007-05-17 Thread Charley Baker
WinExists returns either a 1 or a 0, both are true in ruby. You can use assert_equal instead: assert_equal(1, autoit.WinExists(test.txt - Notepad)) -Charley On 5/15/07, Kui Zhang [EMAIL PROTECTED] wrote: Hello, I have a question for the test case below. When the Notepad window is not open,

Re: [Wtr-general] Where is reporter.rb

2007-05-15 Thread Charley Baker
test-reporter has been deleted from rubyforge, it's successor being ci_reporter by Nick Sieger. Follow this thread for more information: http://www.mail-archive.com/wtr-general@rubyforge.org/msg07217.html -Charley On 5/15/07, Russ DeWolfe [EMAIL PROTECTED] wrote: Where can I get reporter.rb,

Re: [Wtr-general] File problems

2007-05-15 Thread Charley Baker
Hard to say, if you did a copy in the filesystem then everything should be ok. The first is a warning from ruby, if you're not getting that in your run with x.rb, then likely the file contents have changed - you've got a space before a method call. Have the contents of the file changed? Is it in

Re: [Wtr-general] File problems

2007-05-15 Thread Charley Baker
Make sure your load path is referring to the right place. You might want to print out your load path in x or y. puts $: and check that you're not working with duplicate common files. -c On 5/15/07, Ken [EMAIL PROTECTED] wrote: Yea, I did the maintenance in the file system. I didnt make any

Re: [Wtr-general] File problems

2007-05-15 Thread Charley Baker
Are you running through command line? Somewhere there's a disjoint, hard to figure out where. Open up irb and try puts $: and check your scripts for how they're dealing with the path or modifying it. -c On 5/15/07, Ken [EMAIL PROTECTED] wrote: It didnt even display the load path in x or in

Re: [Wtr-general] File problems

2007-05-15 Thread Charley Baker
I often feel like I spend more time on the simple problems than the larger ones. My only guess is that you're not running the right files since your print statements aren't showing up. Get a second pair of eyes to look at it if you can, otherwise if anyone else on the list has suggestions? It's

Re: [Wtr-general] Solution for FAQ Using key/value pairs not working

2007-05-14 Thread Charley Baker
Ah, you're using a class variable and you have no accessor methods so it's only available to . You'll need to add a class accessor or an instance method if you're creating object of type LoginInput to get at the value: class LoginInput @@user_name = Vipul.Goyal def LoginInput.user_name

Re: [Wtr-general] length not recognized for array within a class

2007-05-14 Thread Charley Baker
Hi there, In this case you've created @aObjects as a class instance variable, which means it's not visible to instance methods. Add a constructor to set it up instead: class CLWindow def initialize @aObjects = Array.new end def add_object puts @aObjects.length end end cl =

Re: [Wtr-general] reading cell data into an array

2007-05-14 Thread Charley Baker
Can you give us an example of some of the data in the cell you're trying to collect into an array? You should be able to do something like splitting it into different strings possibly, depends on what you're getting from your cell. -Charley On 5/12/07, Tunde Jinadu [EMAIL PROTECTED] wrote:

Re: [Wtr-general] Solution for FAQ Using key/value pairs not working

2007-05-14 Thread Charley Baker
, Charley Baker [EMAIL PROTECTED] wrote: class LoginInput @@user_name = Vipul.Goyal def LoginInput.user_name @@user_name end end puts LoginInput.user_name = Vipul.Goyal # Now with instance: class LoginInput @@user_name = Vipul.Goyal def user_name @@user_name end

Re: [Wtr-general] reading cell data into an array

2007-05-14 Thread Charley Baker
) I need to place the digits into an array to be used later in the script during pin number validation e.g 'what is the second and third digit of your five digit pin number' On 5/14/07, Charley Baker [EMAIL PROTECTED] wrote: Can you give us an example of some of the data in the cell you're

Re: [Wtr-general] Running test script once for each datarow in excel

2007-05-11 Thread Charley Baker
David Brown posted an interface to Excel on the Watir user contributions area with an example usage case that steps through rows: http://wiki.openqa.org/display/WTR/Excel+interface+class -Charley On 5/11/07, Vipul [EMAIL PROTECTED] wrote: i am testing a site which has login page. i want to

Re: [Wtr-general] Solution for FAQ Using key/value pairs not working

2007-05-11 Thread Charley Baker
Looks like user_Name is not defined for your LoginInput class. Check your casing and make sure it exists there. Might be something like user_name, not user_Name. Otherwise we'd have to have more information on your LoginInput class. -Charley On 5/11/07, Vipul [EMAIL PROTECTED] wrote: now i am

Re: [Wtr-general] Having trouble capturing text in java alert

2007-05-09 Thread Charley Baker
w = WinClicker.new text = w.get_static_text('Microsoft Internet Explorer') # returns an array for each static control text.each {|t| puts t} -Charley On 5/9/07, gary [EMAIL PROTECTED] wrote: Hi everyone, I'm having difficulty in capturing the text from a java alert, and would appreciate

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread Charley Baker
I'm all for a Why style guide. His surreal style sucks more people in than if it was a plain old manual. Maybe a donut eating platypus instead of foxes. :) -c On 5/9/07, Bret Pettichord [EMAIL PROTECTED] wrote: Željko Filipin wrote: Watir user guide can have enterprise look, but I would

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

2007-05-08 Thread Charley Baker
Not to be too blunt, butinstall facets = 1.8.54. gem install facets -c On 5/8/07, Russ DeWolfe [EMAIL PROTECTED] wrote: Here is the message I get when I attempt to install this gem: ERROR: While executing gem ... (RuntimeError) Error instaling unroller: unroller requires

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

2007-05-04 Thread Charley Baker
What's the warning message? On 5/4/07, Venkata [EMAIL PROTECTED] wrote: Thanks chareley, i keep getting warning message in the log end of te script execution. Thanks. ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] Setting focus in a frame in IE7

2007-05-04 Thread Charley Baker
I just ran the same code with IE7 and it appeared to work fine. Just out of curiosity why use send_keys instead of setting the text field? ie.text_field(:index, 1).set('foo') -Charley On 5/4/07, Paul Rogers [EMAIL PROTECTED] wrote: Assuming your html uses regular type html input type - text

Re: [Wtr-general] FireWatir not finding buttons by id

2007-05-04 Thread Charley Baker
It's a curious bug, just saw the same thing. A bug/feature, works more than it should. :) Chris is right we should definitely spend more time with Angrez, Prema and the Firewatir community. I'm getting slammed by requests for multiple browser tests and starting to abstract layers so that it's

Re: [Wtr-general] 'Unable to locate object' problem

2007-05-02 Thread Charley Baker
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

Re: [Wtr-general] Watir - Scrpting issues with Dynamic HTML

2007-04-30 Thread Charley Baker
The main dhtml menu is pretty straighforward using Watir 1.5.1: require 'watir' include Watir ie = IE.start('http://www.ceridian.com/') ie.table(:id, 'STM0_0__5___').fire_event('onmouseover') ie.cell(:id, 'STM0_5__1___MTD').click -Charley On 4/30/07, Paul Rogers [EMAIL PROTECTED] wrote: not

Re: [Wtr-general] Watir - Scrpting issues with Dynamic HTML

2007-04-30 Thread Charley Baker
This is the id I got off of that control in your menus using ie developer toolbar: http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038displaylang=en Watir works off of how and what. How would you like to access a dom element? What can you use to

Re: [Wtr-general] Unable to locate object

2007-04-30 Thread Charley Baker
smokeid means nothing in standard dom. You can use :text to identify the control. Watir works off of standard html attributes and the DOM, this is some sort of custom attribute. This should work. ie.button(:text, 'Login').click -Charley On 4/30/07, Kui Zhang [EMAIL PROTECTED] wrote: Hello,

Re: [Wtr-general] Unable to locate object

2007-04-30 Thread Charley Baker
Install the latest gem for Watir 1.5.1 and try it again if you can . Here's a link for how to do just that: http://wiki.openqa.org/display/WTR/Development+Builds Follow the instructions on the right pane To Install. -Charley On 4/30/07, Kui Zhang [EMAIL PROTECTED] wrote: Thanks Charley for

Re: [Wtr-general] Unable to locate object

2007-04-30 Thread Charley Baker
Yep, we still include autoit. -c On 4/30/07, Kui Zhang [EMAIL PROTECTED] wrote: Hi Charley, Follow your instruction, installed the latest Watir gem. It works now! One question, if I installed the Watir gem, does this include autoit which I need to use in the testing? Or how to check if

Re: [Wtr-general] How to move the mouse to point to an object?

2007-04-25 Thread Charley Baker
Hmm, good question, I don't seem to be able to access it either. Thanks for the public example, I'll look at it some more and see if I can't trigger it. -c On 4/25/07, joe fu [EMAIL PROTECTED] wrote: i've tried to do ie.div(:id, calendarStripDateLabelDock).fire_event(onmouseover)but

Re: [Wtr-general] canoo2watir

2007-04-25 Thread Charley Baker
Could be interesting, I'd looked at webtest when evaluating tools a while back. And as Elizabeth Hendrickson often says...'Show me the code'. It's always helpful and demonstrates the point pretty well and if people want to learn or add on then it gives them a good base. Perhaps it's one other

Re: [Wtr-general] Fwd: + Hackety Hack +

2007-04-25 Thread Charley Baker
Why's Poignant Guide is excellent. It takes learning to program to a new and otherwise other worldly angle. I've been recommending it, you'll either love it or hate it. It'd be nice to work on his basic conceptual view and present a basic programming using Ruby class, wearing bunny suits of

[Wtr-general] OT: New version of RDT plugin for Eclipse

2007-04-24 Thread Charley Baker
For all of you who are working with Eclipse and the rdt plugin, there's a new version finally. They haven't updated their main site, but have a news announcement on their base sourceforge project page: Most notably are the inclusion of refactorings, mark occurrences support, improved code

Re: [Wtr-general] command to get a future date

2007-04-23 Thread Charley Baker
Use ruby's date class. d = Date.today d = d + 7 puts d.day() -Charley On 4/23/07, Maloy kanti debnath [EMAIL PROTECTED] wrote: hi people, In my application i have a calander and i need to select a that is 7 days from today (ie 30th April) . Now the question is . Is there

Re: [Wtr-general] Calling Function Error - like No test were specified

2007-04-20 Thread Charley Baker
Hmmm, there's quite a lot going on here. Where to begin. Classnames must be capitalized: class MainTestManage not class mainTestManage I'm not sure why you've defined a module nor why you're explicitly naming your class names in your module with the as class methods. You maintestManage class

Re: [Wtr-general] Verifying Values of Cookies

2007-04-18 Thread Charley Baker
Hi Gary, This will grab the cookies and put them into an array: require 'watir' include Watir ie = IE.start('http://www.yahoo.com') arr = ie.document.cookie.split(';') # multiple cookies are separated by ;s arr.each {|a| puts a.to_s} -Charley On 4/17/07, Gary [EMAIL PROTECTED] wrote:

Re: [Wtr-general] Will WATIR support MS SQL 2005, if so what are the connections to include.

2007-04-17 Thread Charley Baker
As John's link points out, this is not a watir related question but one covered by other libraries in Ruby, notably either dbi which is mentioned in this posting and likely ActiveRecord. It's important to make the distinction and understand the difference between Ruby as a programming

Re: [Wtr-general] OLE error code:80070005 in Unknown Access is denied.

2007-04-17 Thread Charley Baker
Or you can use the latest version of Watir and it will also go away and give you more functionality: http://wiki.openqa.org/display/WTR/2007/04/12/Watir+Development+Gem+1.5.1.1165+Released The workaround isn't ideal, but should solve this issue for the majority of users. -Charley On 4/17/07,

Re: [Wtr-general] Looping with excel worksheets

2007-04-13 Thread Charley Baker
Hi Nicola, Put it in a method and call the method from within a loop: require 'watir' include Watir url = http://www.zoomerang.com/recipient/survey.zgi?p=WEB225WDYJNVDT; search_string = questionnaire $ie = IE.new $ie.goto(url) $ie.bring_to_front #ie.show_all_objects require 'win32ole' def

Re: [Wtr-general] 'method_missing': document (WIN32OLERuntimeError)

2007-04-13 Thread Charley Baker
Hi Manish, Try using the latest gem on the watir site, 1165. There's a bit of a work around for this issue in place until we get around to a longer term fix. It's the same cross site scripting frame issue which has been discussed on this list previously. -Charley On 4/13/07, Manish Sapariya

Re: [Wtr-general] 'method_missing': document (WIN32OLERuntimeError)

2007-04-13 Thread Charley Baker
. :-) However I noted that even the site says ver 1.5.1.1165, the actual gem file is 1164. Neverthless, it works as expected. Thanks, Manish Charley Baker wrote: Hi Manish, Try using the latest gem on the watir site, 1165. There's a bit of a work around for this issue in place until we get around

Re: [Wtr-general] OT: run Firefox inside Firefox

2007-04-12 Thread Charley Baker
That's oddly disturbing. :) -c On 4/12/07, Chris McMahon [EMAIL PROTECTED] wrote: This makes my head hurt: http://seejay.wordpress.com/2007/04/11/firefox-inside-firefox/ ___ Wtr-general mailing list [EMAIL PROTECTED]

Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-11 Thread Charley Baker
There's no flag in watir to swallow all exceptions, that's rather dangerous behavior and not recommended. You could wrap methods with begin/rescue blocks and print out the exceptions as they occur - follow Zeljko's example above and the more specific the exceptions you catch the better. I'd

Re: [Wtr-general] unknown property or method `readyState' (WIN32OLERuntimeError)

2007-04-11 Thread Charley Baker
It's likely your frames are throwing errors with cross site scripting issues. You might try updating to the latest version of watir 1.5.1.1165 in svn. Installation instructions are included on the FAQ site. I may end up making a gem from the current source today. It's been a while and there have

Re: [Wtr-general] screen_capture filename

2007-04-11 Thread Charley Baker
This is probably some code that needs to be yanked out and put in contrib. I haven't used it and have yet to hear anyone else using it although I'm sure there are some. You might take a look at Aslak Hellesoy's screenshot library.

Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-10 Thread Charley Baker
You can also pull the assertions file and use it with Watir 1.4.1. https://svn.openqa.org/svn/watir/trunk/watir/watir/assertions.rb Download this file, put it in your watir/watir directory and use it the same way I mentioned in my previous mail. -Charley On 4/10/07, Paul Carvalho [EMAIL

[Wtr-general] OT: selenium ajax testing tool released

2007-04-10 Thread Charley Baker
This is an offtopic post on Selenium and a recent release from TIBCO with an ajax testing framework: http://ddj.com/198702228;jsessionid=OP1CXLIHSLECCQSNDLPCKH0CJUNN2JVN? Thoughts? -charley ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] How to Read the values from the Table

2007-04-09 Thread Charley Baker
Hi Vamsi, It would help if you included some html code for what you're looking to find. The basic syntax is this: value = ie.table(:name, 'mytable')[1][3].text That is, get the text that stored in the first row, 3rd column of a table with a name attribute of mytable and assign it to a

Re: [Wtr-general] 1 Questions for Watir's creators

2007-04-08 Thread Charley Baker
Hi Fred, It's standard ruby coding conventions, this style of naming is used in ruby not camel cased as is prevalent in Java and c/c++. Take a look at the Ruby coding conventions doc: http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=RubyCodingConvention The naming conventions lists

Re: [Wtr-general] How to make IE as active windows and capture it?

2007-04-06 Thread Charley Baker
] [mailto: [EMAIL PROTECTED] *On Behalf Of *Charley Baker *Sent:* 2007年4月5日 1:35 *To:* wtr-general@rubyforge.org *Subject:* Re: [Wtr-general] How to make IE as active windows and capture it? ie = IE.new ie.goto('http://www.google.com' http://www.google.com%27) ie.bring_to_front -Charley On 4/4/07

Re: [Wtr-general] .getElementsByTagName

2007-04-05 Thread Charley Baker
In Watir 1.5 there is support for adding elements fairly easily so that you shouldn't have to call getElementsByTagName directly. We haven't added headings yet, but most other common elements are supported and easily extended, you could put the following in a file and include it in your scripts:

Re: [Wtr-general] Can we use as many variable names without worrying about memory wastage

2007-04-03 Thread Charley Baker
You shouldn't have to invoke the garbage collector manually as it runs automatically, most often when ruby is allocating memory and it's internal memory tracker says there isn't any available or if allocating memory fails. -Charley On 4/3/07, vijay [EMAIL PROTECTED] wrote: Thanks for all

Re: [Wtr-general] Need help figuring out the element

2007-03-29 Thread Charley Baker
ie.button(:src, /btn_submitorder/).click There are a few ways to do it, this is one. hth, Charley On 3/29/07, Ruben [EMAIL PROTECTED] wrote: div id=wrap_free div class=signup_block div class=signup_verisign div class=signup_left/div div class=signup_righta

Re: [Wtr-general] IDEs for Watir

2007-03-29 Thread Charley Baker
I use eclipse with the ruby plugin. Curious to find out the reasons why Eclipse isn't working for you, my quick guess would be the load path? If that's the case, then just use the workspace but don't create projects for each directory, just import the file directories directly so you can run it

Re: [Wtr-general] IDEs for Watir

2007-03-29 Thread Charley Baker
Steel actually looks rather interesting although their website could stand a better designer. I'd take a look at it if I was using VS for other work, instead the other code that I look at and tests that I write are in java, so Eclipse is a more natural fit. -c On 3/29/07, John Lolis [EMAIL

Re: [Wtr-general] How to get report message after running everytest case

2007-03-28 Thread Charley Baker
On 3/27/07, Jason He [EMAIL PROTECTED] wrote: Thanks for your reply. But there will no message output in the console. Could it output to both console and file? Regards, Jason -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Charley Baker

Re: [Wtr-general] Watir 1.5..1..1158 installation

2007-03-27 Thread Charley Baker
Possibly you have the Watir 1.4.1 gem in that folder? Try gem install watir-1.5.1.1158.gem -Charley On 3/27/07, Angrez Singh [EMAIL PROTECTED] wrote: Hi, Why you have uninstalled Ruby? Any reasons. Regards, Angrez On 3/27/07, Simba [EMAIL PROTECTED] wrote: I have download Development

Re: [Wtr-general] How to get report message after running every test case

2007-03-27 Thread Charley Baker
You can redirect the output of your bat file to a file: mybat.bat results.txt -Charley On 3/27/07, Jason He [EMAIL PROTECTED] wrote: Dear all, I write some the filename of test cases in a windows bat file, execute the bat file, and then report messages for each test case will output in

Re: [Wtr-general] Reading from excel files (basic)

2007-03-26 Thread Charley Baker
Hi Nicola, you could try something like this: excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open('C:\Documents and Settings\kennedyn\My Documents\WATIR_RUBY\excel _testdata2.xls') worksheet = workbook.Worksheets(1) #get hold of the first worksheet

Re: [Wtr-general] Unable to select the button from button-menu

2007-03-23 Thread Charley Baker
It looks like a frame access error. There's a workaround in the latest code in svn. Follow the instructions for Installing a gem from source on the FAQ page and try it again. http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem -Charley On 3/23/07, Mathew Jacob [EMAIL PROTECTED] wrote: Hi,

Re: [Wtr-general] problem with text_field.set

2007-03-23 Thread Charley Baker
Try setting it directly: $ie.text_field(:id, /grp_name_txtbox/i) = 12345 This won't cause any events to be fired on the control which might in this case be what's tripping up the test. -Charley On 3/23/07, jhun [EMAIL PROTECTED] wrote: My application is written on ajax and im having an

Re: [Wtr-general] clicking image (button?)

2007-03-23 Thread Charley Baker
Good question. Go to the JIRA page for this issue: http://jira.openqa.org/browse/WTR-74 On the left hand side in a frame you should see a link called Vote for It. Click on that and you've voted for it. :) This is actually a good thing for everyone to know. The higher the votes for issues in

Re: [Wtr-general] watir faqs

2007-03-22 Thread Charley Baker
The openqa site is the main site right now. We're keeping the RubyForge site up as well since that's often the first site that people hit when searching for Watir, and connects us to the ruby community to some extent. Otherwise, as you can see, openqa is more current and where most of the

Re: [Wtr-general] How to access browser authentication pop-up

2007-03-22 Thread Charley Baker
We use AutoIt to bypass proxy authentication dialogs, very similar to your Apache basic authentication dialog. Take a look at WindowHelper.rb in the installed watir files, there's a method called logon which should work for you, or at least give you a general idea. Additionally, there's

Re: [Wtr-general] clicking image (button?)

2007-03-22 Thread Charley Baker
Hi Parv, You should be able to click on it with something like this: $ie.button(:src, /\/images/prep/new/submit.jpg/).click * $ie.image(:src, 'http://myDomain.com/images /prep/new/submit.jpg').flash() This control is a button in Watir not an image, the full url isn't listed in the src

Re: [Wtr-general] How to access browser authentication pop-up

2007-03-22 Thread Charley Baker
Well, if you want to go down that roadyou could investigate using Navigate2 on the internal ie ole_object. ie = IE.new ie.ie.Navigate2('http://www.google.com',0,'','') Navigate2 takes 4 possible parameters: url, a constant flag for options, postdata, and headers. The postdata and headers

Re: [Wtr-general] call a method

2007-03-21 Thread Charley Baker
Hi Chitta, I'm not quite sure what you're trying to do here, but it looks like your checkcondition method is in the test case. And you're calling, based on this code, your checkcondition method inside itself. It's a bit hard to even know where to begin with this. Some more context might help,

  1   2   3   >