[Wtr-general] Good 'wrapper' sample

2007-04-13 Thread John Lolis
I had some time to kill this morning so I decided to toss together another 'sample'. I know when I start learning something new there is nothing better then working examples that I can modify and see how they break, so here you go. This is a 'wrapper' for the Google website. I wrote it with the

Re: [Wtr-general] How to post a failed message when the assert fails

2007-04-13 Thread John Lolis
I'm noticing this question or very similar questions get posted a lot here (which means its a good question). I would search through the old posts and read what others said, there has been some very good posts on the subject. Below I'm posting a chunk of code that should help you answer your own

Re: [Wtr-general] Basic question re looping

2007-04-12 Thread John Lolis
You had me laughing in my cube Bret :) I am not a fanilow ___ Wtr-general mailing list [EMAIL PROTECTED] http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Basic question re looping

2007-04-12 Thread John Lolis
Give this a shot require 'watir' include Watir # Lets setup our data so the code is easier to read url = "http://www.google.co.uk"; search_string = "barry manilow" target_url = "http://www.classicbands.com/manilow.html"; # Get IE ready to go ie = IE.new # Goto

Re: [Wtr-general] Using Until

2007-04-03 Thread John Lolis
I'm not sure how new 'wait_until' is, but if you have it do wait_until(time_to_wait_in_seconds){ $ie.element(:type,'value').exists? } ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to check for the presence of a frame in a page?

2007-04-03 Thread John Lolis
Take a look at this thread http://forums.openqa.org/thread.jspa?threadID=7082&tstart=30 I give some ideas on how to approach a very similar problem. The easy option to catch the specific exception and handle it from there. ___ Wtr-general mailing list

Re: [Wtr-general] little framework

2007-04-02 Thread John Lolis
Looks good. In your setup I would wrap $ie with a global function (internet_explorer or some such). I would then use that global function through out your class files. This could save you a headache down the road :) ___ Wtr-general mailing list Wtr-gen

Re: [Wtr-general] Assert Dates?

2007-04-02 Thread John Lolis
Thanks for the demo Chris, I haven't messed with dates beyond the basics, this was a nice way to get brought up to speed. While my first thoughts were along the lines of Chris, I think I would go with the string compare. It seems, in his case, that the level of complexity isn't needed. I can se

[Wtr-general] Localization made 'easier' with yaml

2007-03-30 Thread John Lolis
Another example i thought i would share. Again I tried to keep the code very readable. This example should be enough to get anyone going. I'm currently using this with a DB and storing the yaml in a file, it works great! I'll let the code and comments speak for itself, it should be readable. --

Re: [Wtr-general] problem in identifying the button

2007-03-30 Thread John Lolis
also it looks like its in a table so you could do table(:type,'value')[row][column].click ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] IDEs for Watir

2007-03-29 Thread John Lolis
Jason, I started off using Mondrian ( http://www.mondrian-ide.com/ ) and at first really liked the structure if gave me. I came from Visual Studio .Net so I was very used to the 'Heavy IDE' format. The problem is I started to have growing pains with with it. I noticed that it was slowing down

Re: [Wtr-general] How to check presence of link by using begin -

2007-03-29 Thread John Lolis
wait_until(time_in_seconds){ ie.element(:type,value).exists? } that? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Saving the state of your test using yaml

2007-03-29 Thread John Lolis
This is something I've started using and I figured others might find it useful. The main form of testing I have been doing is a 'smoke test'. This is a complex test that takes about 20 minutes to setup data to get the expected results at the end. The issue i ran into with this is that the system

Re: [Wtr-general] watir execution from webserver

2007-03-28 Thread John Lolis
areed, I have noticed that paths in ruby are relative to file that is being executed ( i think ). This has caused a couple of head scratching moments on my part while i wonder they files will no longer load using relative paths. I'm not sure this is related to your problem, hope it helps. _

Re: [Wtr-general] Question about "wait_until(n) {element.exists?}"

2007-03-28 Thread John Lolis
Thanks for the feedback everyone, Heres another way of approaching the problem. This takes the current wait_until it makes it tolerant to exceptions. This seems to have the desired effect. I don't think this should be used for any real code, just food for thought. require 'watir' include Wat

Re: [Wtr-general] .Can we set the Watir's time_out_value in the script?

2007-03-28 Thread John Lolis
class Watir::IE @@attach_timeout = 10 end I think that should work ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Watir can't find IEnum interface

2007-03-26 Thread John Lolis
Ruby 182-15, Watir 1.5.1.1136 works fine ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Question about "wait_until(n) {element.exists?}"

2007-03-23 Thread John Lolis
waitr 1136 Lets say I have the following action i want to perform $ie.frame('Frame').table(:id,'ID).table(:index,1)[1][2].click But, the this is frame heavy page, and wait sometimes doesn't play nice, so I decide to do element = $ie.frame('Frame').table(:id,'ID).table(:index,1) wait_until(30)

Re: [Wtr-general] Identifying Correct column from multiple header row that spans cells?

2007-03-14 Thread John Lolis
I have no idea if this will help you, i wrote it awhile ago and it still works for me. I ripped out as much app specific junk as i could :) look at 'multi_find' and work your way down. Its not exactly what you want but might give you ideas. "find_value" would be values in rows, "find_type" would

Re: [Wtr-general] Selecting an 'accented character' from a list

2007-03-06 Thread John Lolis
Ok, you guys helped me out more then i thought. The *real* problem was that i was using single quotes and that my editor was corrupting the accented characters. I now pull the values straight from the db, wrap some basic ruby around them and make a translation file. Works like a champ!

Re: [Wtr-general] Selecting an 'accented character' from a list

2007-03-03 Thread John Lolis
well heres some more code i found, which does the conversion. Now i just need to go the other way string = "Nome do servi\347o" puts string.gsub(/.$/u, '') regex = Regexp.new(//u) - Posted via Jive Forums http://forums.open

Re: [Wtr-general] Selecting an 'accented character' from a list

2007-03-03 Thread John Lolis
Thank you both for the information. I can enter the data fine (just need to use an editor that can handle special characters). The issue remains that in the html the value is "servi & # 2 3 1 ; o" (note i included spaces so you could see all the characters), watir stores the value as "Nome do s

[Wtr-general] Selecting an 'accented character' from a list

2007-03-02 Thread John Lolis
Looking for a bit of help here. I have a select list that has the following value 'Nome do serviço'. When I do select_list(whatever).text i get back 'Nome do servi\347o' if i look in the source of the html i get 'Nome do serviço' I also found code to convert 'Nome do serviço' to 'Nome do servi

Re: [Wtr-general] Can Watir be paused & resumed manually

2007-02-28 Thread John Lolis
You are looking for some kind of interactive script. I can't imagine its too hard to do, but I don't have much time to mess around with it. Heres a fun little script i put together to test out an idea. Maybe it will spark some ideas. (note: do not use this for anything, its just for fun. Also,

Re: [Wtr-general] PopUp window problem

2007-02-28 Thread John Lolis
if i'm reading this right, you click "$ie.button(:value, "Log on").click " and it makes a pop up window? $ie.button(:value, "Log on").click_no_wait $ie.modal_dialog.button(:value, "close").click that might do it. If you have an old version of watir this might not work. -

Re: [Wtr-general] Can Watir be paused & resumed manually when running

2007-02-27 Thread John Lolis
I like using http://rubyforge.org/projects/ruby-breakpoint/ all you do is call "breakpoint()" and the application stops. The best part is that you are now at the IRB prompt so you can do all sorts of fun things :) I setup my smoke test to call break point on any exception, i can then hop in a

Re: [Wtr-general] Assert with If...Else...End not working as specified in example

2007-02-22 Thread John Lolis
I'm no expert on assert, but heres what I would try Do a puts ie.text (i think there is a text, if not html) and confirm you can see it maybe the text you want is in a different frame? - Posted via Jive Forums http://forums.openq

Re: [Wtr-general] Nested Frames

2007-02-22 Thread John Lolis
> As a side note, I just found out another possible > case where the cross site > cripting/frame access problems will happen when the > frames are being served > by the same domain *and* you have proxy enabled in ie > which would explain > some issues I've encountered. I have frames being served

Re: [Wtr-general] Nested Frames

2007-02-22 Thread John Lolis
bret, I don't have time to look into this right now (too much going on at work), but something is up with 1158. I have areas in my app where it just waits forever (never used to happen) and its spitting out access denied errors constantly (single server). I reverted back to ruby 1.8.2 and 1145

Re: [Wtr-general] Print statements

2007-02-20 Thread John Lolis
I may be way off base here. Something has to call those functions to display the puts. As long as "test_1" gets called, puts should work. Maybe its just not getting called? puts "Begin test" class DNX_1 def test_1 puts "Howdy" end end new_class = DNX_1.new() new

Re: [Wtr-general] OT: Test unit reporter project dead?

2007-02-20 Thread John Lolis
http://rubyforge.org/frs/?group_id=2857&release_id=9716 I think that will get you want you want - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6596&messageID=18947#18947

Re: [Wtr-general] Watir.. close, but not close enough

2007-02-20 Thread John Lolis
> I think the problem for the OP is that we don't have > good > examples/documentation describing this approach. I don't feel that its a problem Watir needs to solve. If the community really did want some framework I think it would be a project separate from Watir. I'm not even sure a project l

Re: [Wtr-general] How to call .fireEvent(event, eventObj)?

2007-02-16 Thread John Lolis
find the element that has it and try something like ie.link(:what,ever).fire_event('even_name') i think - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6583&messageID=18794#18794 ___

Re: [Wtr-general] VBScript Fails with Watir

2007-02-15 Thread John Lolis
What does the actual HTML look like for link you are clicking? Maybe there is some kind of event that needs to be fired? My gut feeling is that you are just 'clicking the wrong thing'. Again, this is just a wild guess i really have no clue whats going on in here :) --

Re: [Wtr-general] 'ie.close' or 'ie.close if ie'

2007-02-15 Thread John Lolis
I'm not exactly sure why someone would do 'ie.close if ie'. Below is my best guess at it. --- require 'watir' include Watir ie = nil if ie puts 'ie object created' else puts 'no ie object' endie ie = IE.new() if ie puts 'ie object created' else puts 'no ie

Re: [Wtr-general] Why this error and how to supress it?

2007-02-15 Thread John Lolis
check the FAQ ( http://wiki.openqa.org/display/WTR/FAQ ) see "Access denied when trying to access a frame" that may be the issue, not sure. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6558&messageID=187

Re: [Wtr-general] [NEWBIE] can't convert WIN32OLE into

2007-02-13 Thread John Lolis
> However those others were not helpful. If you check > the console output i pasted, you will realize that > puts cmdButton actually works fine and prints the > properties of the button. Furthermore the error is in > a "match" function, not in the "puts" function. More > careful reading next time p

Re: [Wtr-general] [NEWBIE] can't convert WIN32OLE into String (TypeError)

2007-02-12 Thread John Lolis
> mainFrame.link(:text,"Recibir Documentos").click > cmdButtonGo = mainFrame.button(:name,"cmdGo") > puts cmdButtonGo > cmdButtonGo.click <-- error here!!! what are you expecting "puts cmdButtonGo" to do? :) Message was edited by: jlolis --

Re: [Wtr-general] href javascript

2007-02-09 Thread John Lolis
use the IE dev toolbar and just count it out :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18514#18514 ___ Wtr-general mailing list Wtr-general@

Re: [Wtr-general] href javascript

2007-02-09 Thread John Lolis
I looks like this is in a table, figure out which row and cell it is in then do table(:what,ever)[row][cell].click that might work. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18494#18494

Re: [Wtr-general] url for link

2007-02-09 Thread John Lolis
div(:id, "ContractDoc").click i think that should work - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=18488#18488 ___ Wtr-general mailing list Wtr-

Re: [Wtr-general] how ie.div(:name => 'foo',

2007-02-09 Thread John Lolis
when you make a new thread you have the option of making it a 'question'. If you do that then there will be an icon next to each post to mark them as correct or mostly correct. Think its too late now though :) - Posted via Jive

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] 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 http://forums.openqa.org/thread.jspa?threadID=6445&messageID=

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 http://forums.op

Re: [Wtr-general] renaming sheets in Excel

2007-02-07 Thread John Lolis
Heres a link i found useful when i was going using Excel http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18341#18341 __

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

2007-02-07 Thread John Lolis
Another option is to locate it within the table. ie.table(:what, ever).button(:index,number) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18335#18335 ___

Re: [Wtr-general] WIN32OLERuntimeError

2007-02-07 Thread John Lolis
Post your code, I'm willing to bet that you are doing something out of order. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18316#18316 ___ Wtr-gen

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

2007-02-06 Thread John Lolis
Google spit this out http://wiki.rubyonrails.com/rails/pages/HowtoConnectToMicrosoftSQLServer never tried it, but it might help :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18254#18254

Re: [Wtr-general] hypertext is present ?

2007-02-06 Thread John Lolis
ie.link(:text, 'Consultation des AS').exists? is that what you are looking for? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6436&messageID=18223#18223 ___ Wtr-

Re: [Wtr-general] Unable to access a modal dialog box to select a

2007-02-02 Thread John Lolis
My best guess is that your modal dialog is using frames. The HTML that its returning is not the right frame. Thats my best guess and how i would approach the problem. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?

Re: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy?

2007-02-01 Thread John Lolis
Yes, i think this should work. I have never tried this and I can assure you that it will break way more things then it could ever fix :) module Watir class IE def wait puts 'hello' end end end

Re: [Wtr-general] Unable to access a modal dialog box to select a

2007-01-31 Thread John Lolis
> Another option is to use this script: > > puts $ie.modal_dialog.html ... something about a forest and trees comes to mind ... Thanks for such a simple solution :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?t

Re: [Wtr-general] Unable to access a modal dialog box to select a particular value from i

2007-01-31 Thread John Lolis
Good question, heres my trick. Download a product called spysmith (its linked in the wiki, but i'm sure google can find it). After you install this spysmith allows you to see HTML values of any web page (including modal). The real trick though is that it allows you to see ALL the HTML. So what

Re: [Wtr-general] Why does Watir sometimes not open an IE window, yet continues to run te

2007-01-26 Thread John Lolis
I have never seen this happen. Are you using "-b (background) Run Internet Explorer invisible" when you run the program? Is IE just minimized by chance? What version of IE are running? Is this a multi desktop setup (is it off the screen?) Just some ideas :) --

Re: [Wtr-general] BUG: Using XPath

2007-01-25 Thread John Lolis
thanks for the link Zeljko, always wondered how patches worked. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6275&messageID=17660#17660 ___ Wtr-general mailing l

Re: [Wtr-general] How to access a table present within a form?

2007-01-25 Thread John Lolis
> result = ie.frame('builderFrame') > , < > form(:name,'dummy').table(:index,1)[1][1].text well if that comma is in the actual code i don't think its going to work :) - Posted via Jive Forums http://forums.openqa.org/thread.js

Re: [Wtr-general] undefined method `[]' for

2007-01-24 Thread John Lolis
> Another way to say this is: > > t.each {|x| puts x[0]} I'm enjoying this thread, heres another way. Sans "0"! for element in (t.index(t.first)..t.index(t.last)) puts t[element].first end - Posted via Jive Forums http

Re: [Wtr-general] Watir with Ajax

2007-01-18 Thread John Lolis
It may help if you include a snip of your code and html. I haven't had any problems using any 'ajax' items. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6170&messageID=17315#17315

Re: [Wtr-general] how to use the commands present in the 'SimpIe' class?

2007-01-18 Thread John Lolis
not sure on your exact question but would ie.link(:text,'Images').click work? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6165&messageID=17314#17314 ___ Wtr-g

Re: [Wtr-general] FireWatir version 1.0.1 released

2007-01-17 Thread John Lolis
great to hear! I'm going to give this a shot today. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6147&messageID=17246#17246 ___ Wtr-general mailing list Wtr-gen

Re: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4

2007-01-16 Thread John Lolis
Adding to what Zeljko said, Is there a way for Watir when its first load to check your version or ruby, if AutoIt is loaded and if things aren't as they should be spit out a warning? - Posted via Jive Forums http://forums.openqa.

Re: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4

2007-01-15 Thread John Lolis
Thanks! I guess I should just read the error message more carefully next time :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6110&messageID=17153#17153 ___ Wtr

Re: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4

2007-01-15 Thread John Lolis
thanks zeljko, I am logged in as an admin. I tried to register win32ole.so (which i have no idea what kind of file it is). Is there a win32ole.dll somewhere I should try? - Posted via Jive Forums http://forums.openqa.org/thread.j

[Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4

2007-01-15 Thread John Lolis
I seem to be having some issues attaching to modal_dialogs. I tried to register my win32ole but it didn't seem to help. (the dialog popped up and said it didn't appear to be a valid dll) Heres my session in the IRB. Not after I hit 'new' I manually navigated and opened a modal dialog. Do I need

Re: [Wtr-general] Error with file_field in a modal window (using

2007-01-11 Thread John Lolis
Thanks Bret! Everything is working perfect now. (who do i send the beer to?) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6074&messageID=17052#17052 ___ Wtr-gen

Re: [Wtr-general] OT: Need help Trapping Errors in Ruby

2007-01-10 Thread John Lolis
> ## Main script snippet: > ... > # open the IE browser > $ie = IE.new > # A) Walk the Public Pages. => Need to Trap this so > the > something_went_wrong" variable works correctly > page_set_to_check( walk_Public_Pages ) > --- > > # Here's the page_set_to_check() method: > > module site_w

Re: [Wtr-general] Error with file_field in a modal window (using

2007-01-10 Thread John Lolis
Thanks for the information! I registered AutoItX3.dll using regsvr32 and it got rid of the error message, the problem now is it doesn't fill in the field with any text. I can flash it, so i know I have the right field - I just can't put anything in there. any more ideas? ---

[Wtr-general] Error with file_field in a modal window (using 1.8.2 / 1.5.1.1127 )

2007-01-10 Thread John Lolis
Having some problems using file_field in a modal window. Like the subject says i do have 1.8.2 installed (just installed it) and Watir 1.5.1.1127 (from the gem) and I'm getting the following error. The AutoIt dll must be correctly registered for this feature to work properly c:/program files/ru

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

2007-01-09 Thread John Lolis
I just ran into same problem myself i think. I am running 1.8.4. Going to switch to 1.8.2 tomorrow and see if that fixes it. The AutoIt dll must be correctly registered for this feature to work properly C:/Program Files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir/windowhelper.rb:42:in

Re: [Wtr-general] hi , few quries with WATIR

2007-01-09 Thread John Lolis
for editors I use Mondrian. Its very simple, but works great. Try out a bunch of them, find one that works for you. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6048&messageID=16961#16961

Re: [Wtr-general] Syntax for relative attributes

2007-01-09 Thread John Lolis
I think what bret said is $my_button = $ie.button(:id, 'foo') is a bad idea. It may be better to do something like... def my_button() return( $ie.button(:id, 'foo') ) end while my_string = $ie.text could be fine, though you could still do def my_string() return( $ie.text ) end ... i think

Re: [Wtr-general] Menu links have duplicate attributes

2007-01-08 Thread John Lolis
Are either of the "Edit News" links contained within another element (table?). You may be able to do something like ie.frame('whatever').table(:id,'table1').link(:title,'Edit News') and ie.frame('whatever').table(:id,'table2').link(:title,'Edit News') like the other poster said though, a hard

Re: [Wtr-general] What are people using for 'test executive'?

2007-01-05 Thread John Lolis
> Otherwise a group I'm associated with is beginning to > write an open source enterprise Ruby Rails interface > for launching Watir scripts remotely but we've only > begun and it may take up to a year before we have > anything solid. I think as Watir becomes more mature and accepted tools like th

Re: [Wtr-general] Syntax for relative attributes

2006-12-21 Thread John Lolis
> link = ie.div(:text, 'Pragmatic Version > Control').after.link(:class, > addtocard') > > > I think this is less intuitive and it would be > somewhat harder to > implement. That's why i came up with the other > proposal, above. Thats actually the first way I thought of it too. A second, sli

Re: [Wtr-general] How to capture exception details

2006-12-21 Thread John Lolis
see: http://www.rubycentral.com/book/tut_exceptions.html this might be enough brain food to get you started. Just need to throw in some control loop (an array of tests maybe?), specific error handling and maybe even retries. begin -#Do your thing rescue -#put the error data into something nice

Re: [Wtr-general] Syntax for relative attributes

2006-12-20 Thread John Lolis
headline = $ie.div(:text, 'Pragmatic Version Control') link = $ie.link(:class => 'addtocart', :after? => headline) Is this saying you want the link that comes after headline? Is there a before? :) *if* thats the case, my only problem with it is that it seems to not follow the standard syntax o

Re: [Wtr-general] CRITICAL---Clicking Image Button in Application

2006-12-20 Thread John Lolis
have you tried .fire_event('onClick')? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5868&messageID=16411#16411 ___ Wtr-general mailing list Wtr-general@rubyforge

Re: [Wtr-general] Wait functionality in Watir ..need help

2006-12-20 Thread John Lolis
You have the right idea, wanting to wait until the bar is done, but you are approaching it slightly wrong. I would first try to understand why *you* know the progress bar is done. Is it because the bar gets to the end and its full? Is it because something says 'complete'? How do you know it fail

Re: [Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread John Lolis
just for fun i opened up the irb and did the following irb: require 'Watir' and that happend. I wouldn't worry about it :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5662&messageID=15830#15830

Re: [Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread John Lolis
shot in the dark here, did you by chance "require 'Watir'" twice? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5662&messageID=15816#15816 ___ Wtr-general mailing

Re: [Wtr-general] How does one access a web page element by its css class?

2006-12-07 Thread John Lolis
While I can't answer the exact question, I can explain how I would solve it. Find the 'nearest' containing element that you can use (a table, div, span - whatever). Then use that element AND the index of the image. This helps you narrow it down. So say you had Table :id 'table_one' row row .im

Re: [Wtr-general] Excel Or Text File?

2006-12-05 Thread John Lolis
If these are just a couple of simple constants why not make it a ruby file? require a file somewhere in your scripts and do something like $name = 'name' $password = 'password' $url = 'url' its easy to figure out, and no need to parse anything. ---

Re: [Wtr-general] how to tell when IE is *really* done

2006-11-28 Thread John Lolis
maybe a silly question, how do we apply the above patch? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5487&messageID=15295#15295 ___ Wtr-general mailing list Wtr

Re: [Wtr-general] Can't Determine The Error...

2006-11-28 Thread John Lolis
I assume this is the standard 'access is denied' error. http://wiki.openqa.org/display/WTR/FAQ Look for the 'access is denied' section, it should help. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5476&m

Re: [Wtr-general] Find parent table index from a specific element within

2006-11-15 Thread John Lolis
That is actually a really nice simple solution, I have no idea why I didn't think of it. I decided to go with a simple parser. It looks for a certain table, finds a sub stable by index, finds the length then attempts to locate input fields within it. Thank you though, you got my brain thinking

[Wtr-general] Find parent table index from a specific element within

2006-11-15 Thread John Lolis
Lets say we have the following Table .TR ..TD ..TD ...SPAN text=findme ..TD ...Text Input Field The only element in this entire section that I can identify uniquely is the span. The span happens to be located within a table. That table also contains the text input field (my real goal). So is th

Re: [Wtr-general] WIN32OLERuntimeError - I get this error after two

2006-11-09 Thread John Lolis
So if I'm reading this right you are saying you have collected 2670 links, but are exploring link 129 and the browser closes? The exploring is just a goto 'address' I assume. If my assumptions are correct, heres a couple questions. Questions, If you attempt to go straight to that link (hard cod

Re: [Wtr-general] detecting an item in drop down list

2006-11-09 Thread John Lolis
As with everything i type, I'm sure its not the best of way of doing it. Heres a quick way of getting it working until someone comes along and helps. select_list = $ie.select_list( :name , 'yourSelectListHere'). select_list.text.include? 'What you want to find' Message was edited by: j

Re: [Wtr-general] Watir tests as how-to documents

2006-11-08 Thread John Lolis
I do this to a degree, but I consider it to be logging not documentation. I have 3 levels of logging (there are more, but thats besides the point) Section, Test and Details A section would be like "Administration" a test would "Create a New User" and details are "Clicked 'new user', 'Set user n

Re: [Wtr-general] click_no_wait (again)

2006-11-07 Thread John Lolis
Post the code you are using that causes this, that might help :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5137&messageID=14254#14254 ___ Wtr-general mailing

Re: [Wtr-general] QuickTest Pro vs Watir?

2006-11-07 Thread John Lolis
Thanks for the great input. I have a more specific question though. How is the support of (well written) QTP steps down the road? Watir/Ruby scripts (if well designed) seem to be very easy to support. Is that also the case with QTP? ---

[Wtr-general] QuickTest Pro vs Watir?

2006-11-06 Thread John Lolis
Looking for some experience from people that have used both. We are currently looking into both of these applications, and I'm wondering if anyone has any experience (that they care to share on the subject). Cost alone isn't that big of an issue. So its a point that doesn't need to be stressed.

Re: [Wtr-general] Recover from IE crash?

2006-11-06 Thread John Lolis
Thanks for the input. I was seeing the crash as a problem to get around, as opposed to a problem to investigate :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5069&messageID=14195#14195 _

Re: [Wtr-general] Hacking Ruby

2006-11-03 Thread John Lolis
very cool! I have been wondering how to do something like this, and it makes so much sense now. thanks! - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5072&messageID=14118#14118 __

[Wtr-general] Recover from IE crash?

2006-11-02 Thread John Lolis
I seem to have found a way of crashing IE during my testing (something I do makes it happen, though I have never done it in a manual way). Is there a way to recover from this? (IE, can I close the dialog that asks me to debug it?) Message was edited by: jlolis -

[Wtr-general] "Breakpoint" great tool to use with Watir

2006-10-30 Thread John Lolis
Just thought I would share this. I found this interesting program called "breakpoint" http://ruby-breakpoint.rubyforge.org/ this allows you to add "breakpoint()" anywhere in your program and the IRB pops up. You can then poke around and debug issues. This has been a HUGE help to me. It allows

Re: [Wtr-general] Handling multiple versions of a website [advice

2006-10-25 Thread John Lolis
Great advice so far, and thank you for the link to the article. The idea of testing the testing framework is very interesting! I guess it would be really straight forward to write a basic test that jumps into the framework, and just does a very basic probe making sure no exception gets thrown.

Re: [Wtr-general] Handling multiple versions of a website [advice needed]

2006-10-25 Thread John Lolis
Thanks for the input davemunns, its nice to hear from someone who is so far along in a project. My only real fear is that of maintaining such a giant library. If you were to leave your company tomorrow, would someone be able to pick it up in time before it got too out of date? I typed a lot mo

[Wtr-general] Handling multiple versions of a website [advice needed]

2006-10-24 Thread John Lolis
Looking for some feed back on this topic. To start, I'm attempting to automate a very large and very complex web application. Watir is great at handling all the strange controls (it has some timing issues with frames and modal dialogs, but those are known issues). The problem I now face is how

  1   2   >