Re: [Wtr-general] Unable to select an item using select_list

2007-07-18 Thread Cain, Mark
I don't think you are supposed to put single quotes around the regular expression. --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of rvishnubhotla Sent: Wednesday, July 18, 2007 10:29 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Unab

Re: [Wtr-general] Unable to select an item using select_list

2007-07-18 Thread Cain, Mark
You could have done this also: ie.select_list(:name, "productId").select(/Catalyst 6500/i) --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Željko Filipin Sent: Wednesday, July 18, 2007 2:34 AM To: wtr-general@rubyforge.org Subject: Re:

Re: [Wtr-general] How to click a row from table in webpage

2007-07-12 Thread Cain, Mark
(also 1-based). e.g. table[1][3].click (click column 1 row 3) You may need to tweek around with this a bit. You can use the flash method to zero in on you target area. Hope this helps, --Mark ____ From: Cain, Mark Sent: Thursday, July 12, 2007 6:57

Re: [Wtr-general] How to click a row from table in webpage

2007-07-12 Thread Cain, Mark
First off, Tables currently support only two attributes in Watir 'id' and 'index'. Since the Table in your does not use the 'id' attribute you must supply the proper index. To identify what is the proper index for this particular table do a 'View Source' on the web page you want to use. Do a 'ct

Re: [Wtr-general] Handling Popup

2007-06-26 Thread Cain, Mark
Do you have this " require 'watir/contrib/enabled_popup' " in code script? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chong Jiang Sent: Tuesday, June 26, 2007 8:20 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Handling Popup Could

Re: [Wtr-general] Select the first item in a list

2007-06-22 Thread Cain, Mark
This may be a little kludgy but worth a try. You will have to make the object names what are in you page... list_one = [] list_one = $ie.select_list( :name, 'list1').getAllContents # Get the contents of the first selectlist and randomly select one cnt = rand(list_one.length) # If there is a place

Re: [Wtr-general] Can Someone Explain This Pls... I Cant Find TheReason...

2007-06-22 Thread Cain, Mark
Did you try using the 'click_no_wait' method for the link click? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of san Sent: Friday, June 22, 2007 2:26 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Can Someone Explain This Pls... I Cant

Re: [Wtr-general] how to properly use the snippet function?

2007-06-13 Thread Cain, Mark
The attached file works on my Windows XP/IE7 machine. It will delete all the temporary internet files and the cookies. I don't remember where I got it or who wrote it originally, but I tweaked it to get it to work right for me. Hope this helps, --Mark -Original Message- From: [EMAIL

Re: [Wtr-general] Handling Popup

2007-06-12 Thread Cain, Mark
I had to alter this method when I had a Pop-up occur from clicking a radio button (couldn't use the click_no_wait). This seemed to get me past that problem. require 'tread' ... def startClicker(button, ieObj) # Strart a new thread that will dismiss the JSPopup. if ieObj != ni

Re: [Wtr-general] Not able to identify a pop up

2007-05-14 Thread Cain, Mark
<-- other requires omitted --> require 'watir/contrib/enabled_popup' reguire 'thread' def startClicker(ie, button) # Strart a new thread that will dismiss the JSPopup. t = Thread.new { w = WinClicker.new hwnd = $ie.enabled_popup(10) if nil == hwnd w

Re: [Wtr-general] Handling popup message

2007-05-14 Thread Cain, Mark
You misspelled Cancel startClicker( "Calcel", 7 , "" ) --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kui Zhang Sent: Friday, May 11, 2007 4:36 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Handling popup message Hello Charley, I a

Re: [Wtr-general] JS Alert from a checkbox

2007-04-18 Thread Cain, Mark
e, the method of modifying the methods in watir.rb in the patch should work for your problem as well, but you'll be stuck patching watir.rb every time you install. Ethan On 4/16/07, Cain, Mark <[EMAIL PROTECTED]> wrote: > > > > > Does anyone have an answer to this? I can&

Re: [Wtr-general] JS Alert from a checkbox

2007-04-16 Thread Cain, Mark
Does anyone have an answer to this? I can't seem to get the click_no_wait to work for checkboxes. --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark Sent: Friday, April 13, 2007 10:05 AM To: wtr-general@rubyforge.org Su

[Wtr-general] JS Alert from a checkbox

2007-04-13 Thread Cain, Mark
I have a JS Alert that popups from clicking a checkbox. How can I use the click_no_wait functionality for the 'set' method of the checkbox? Thanks, Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 [EMAIL PROTECTED] 509.376.

Re: [Wtr-general] Calculating attachment uploading time

2007-03-16 Thread Cain, Mark
I wrote this to get page loads times but you should be able to use it to accomplish what you are asking. require 'date' $start = DateTime.now # process you want to time here... $stop = DateTime.now diff = $stop - $start h,m,s,frac = Date.day_fraction_to_time(diff) s += frac

Re: [Wtr-general] I'm a little confused..

2007-03-14 Thread Cain, Mark
Take a look at the unittests that are included in the Watir installation. There is just about anything you might want to do is represented in those tests or can be easily derived from them. --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [Wtr-general] http_error_checker on IE7

2007-03-14 Thread Cain, Mark
You might try a tool like Fiddler. --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bach Le Sent: Wednesday, March 14, 2007 1:16 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] http_error_checker on IE7 Paul, do you know if it's possib

Re: [Wtr-general] Assert in helper class in require'd file

2007-03-08 Thread Cain, Mark
I am pretty sure your class need to inherit from Test::Unit::TestCase (if that is the right way to say it). class MyStuff < Test::Unit::TestCase def verifyAndGo(linkName) assert($ie.link(:text, linkName).exists?) $ie.link(:text, linkName).click end end --Mark -Original Message--

Re: [Wtr-general] How to make sure that script run in linesquencerather than alphabetical sequence when using load

2007-03-08 Thread Cain, Mark
I ran into this irritating behavior a while back and it appears that ruby ASCII sorts the test methods before execution. I solved it by putting 01, 02, 03, ... after 'test' (test01, test02, etc) and then the test would run in the order I put them in.

Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5

2007-03-01 Thread Cain, Mark
Do we have a timeline on when this will work in 1.8.5? Is anyone working on this? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Rogers Sent: Thursday, March 01, 2007 11:16 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Probl

Re: [Wtr-general] Accessing Nested Tables

2007-02-27 Thread Cain, Mark
Try something like: $ie.table(:index, 2)[1][1].flash Index is one-based and derived by counting the topmost table (do a view source >> ctrl + f >> 'mailto:[EMAIL PROTECTED] On Behalf Of Steve Tangsombatvisit Sent: Tuesday, February 27, 2007 11:52 AM To: wtr-general@rubyforge.org Subject: [Wtr-g

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

2007-02-20 Thread Cain, Mark
where does one get the gem? it doesn't appear to be on rubyforge. --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nick Sieger Sent: Sunday, February 18, 2007 11:59 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] OT: Test

Re: [Wtr-general] OT: algorithm help?

2007-02-13 Thread Cain, Mark
Be aware that when you do a rand(100) that it is inclusive of zero so you will need to adjust your arange to include it (arange=[0..30]) def getNum a = b = c = d = 0 1000.times do |foo| num= rand(100) case num when 1..30 a += 1 when 31..60 b += 1 when 61..100

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

2007-02-07 Thread Cain, Mark
For those of us that have been following this thread... Please share the code that you got to work. I (and I am sure others do as well) collect code piece/scripts and tuck them away for possible use at a later time. Many of the solutions I have today have been gathered piecemeal over months of h

Re: [Wtr-general] ignoring the SELECT option

2007-01-17 Thread Cain, Mark
Here is my $0.02. lbDocTypeID = [] lbDocTypeID = $ie.frame(:index, 4).select_list( :name, 'DocTypeID').getAllContents cnt = rand(lbDocTypeID.length) next if "#{lbDocTypeID}" == ("-- Select Doc Type --") $ie.frame(:index, 4).selectBox( :name, 'DocTypeID').select("#{lbDocTypeID[cnt]}") --

Re: [Wtr-general] Alert box - hangs

2007-01-11 Thread Cain, Mark
Can you send your code and html so I can see what you're doing? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of usha Sent: Wednesday, January 10, 2007 4:13 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Alert box - hangs I'm using IE

Re: [Wtr-general] Alert box - hangs

2007-01-10 Thread Cain, Mark
What version of IE are you using? Because in IE7 Microsoft changed the tile bar name of all popups from "Microsoft Internet Explorer" to "Windows Internet Explorer" this would cause a Hang as you described. --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Beh

Re: [Wtr-general] Alert box - hangs

2007-01-10 Thread Cain, Mark
Can you send your code and html? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of usha Sent: Tuesday, January 09, 2007 4:31 PM To: wtr-general@rubyforge.org Subject: [Wtr-general] Alert box - hangs Hi, I've been trying to click on the Alert box wi

Re: [Wtr-general] how to handle the file download window !

2007-01-09 Thread Cain, Mark
require 'watir' require 'watir\contrib\enabled_popup' include Watir # This method grabs the handle of the window and clicks the button # you specify by passing in the button text. # For the File Upload dialog use the user_input parameter # to supply the path to the file you want to u

Re: [Wtr-general] Give a solution fo javascript popup

2007-01-02 Thread Cain, Mark
javascript popup Mark, You mind posting that to the FAQ site? Definitely an FAQ and then you or anyone can send out the url. -Charley On 1/2/07, Cain, Mark <[EMAIL PROTECTED]> wrote: I have posted this many time, it is the most reliable JS popup method I have every used. It wil

Re: [Wtr-general] how to minimize the command prompt

2007-01-02 Thread Cain, Mark
Change this line from: c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} " to: c = "start rubyw #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} " --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [Wtr-general] Give a solution fo javascript popup

2007-01-02 Thread Cain, Mark
I have posted this many time, it is the most reliable JS popup method I have every used. It will even work for the input box (by supplying the user_input="whatever the user would input") and file upload dialog (by supplying user_input='&Save' or '&Open'). It is better and more reliable than the

Re: [Wtr-general] How do I click the "OK" button on a java alert?

2007-01-02 Thread Cain, Mark
I have found Autoit a little flaky. You can use what is already built into Watir. Here is a method I wrote to handle most of my popup needs.. You will need to use the newest gem if Watir (get it here http://wiki.openqa.org/display/WTR/Development+Builds) : require 'watir\contrib\enable

Re: [Wtr-general] Issue WTR-108 - file_field.set not working

2006-12-14 Thread Cain, Mark
I ran this locally and it worked for me. require 'watir' require 'watir\contrib\enabled_popup' include Watir def startClicker( button , waitTime=9, user_input=nil) hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClic

Re: [Wtr-general] Issue WTR-108 - file_field.set not working

2006-12-13 Thread Cain, Mark
x does not even appear. Richard From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark Sent: Wednesday, December 13, 2006 4:42 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Issue WTR-108 - file_field.set not working Please tell us

Re: [Wtr-general] Issue WTR-108 - file_field.set not working

2006-12-13 Thread Cain, Mark
Please tell us what the problem is? Does it hang? Does is error out? Show us the does you are using. --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Oei Sent: Wednesday, December 13, 2006 12:58 PM To: wtr-general@rubyforge.or

Re: [Wtr-general] pop up box

2006-12-11 Thread Cain, Mark
d the winclicker clickJSDialogue method and ran it has a separate process, however it didn't seem to find the window. I'll have to give it some more time. Cheers, Matt ____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark S

Re: [Wtr-general] pop up box

2006-12-11 Thread Cain, Mark
Did you get this solved? --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Makins Sent: Thursday, December 07, 2006 4:24 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] pop up box Hi, I have a pop up box that appe

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

2006-12-11 Thread Cain, Mark
Also there is a datahandler class that comes with Watir watir/datahandler.rb that works pretty well. There a usage section at the beginning of the file that should get you started. If you want something more robust, I have been using FasterCSV and it work well as is faster then the standard CSV t

Re: [Wtr-general] Editing fields in 'Save As' dialog

2006-12-11 Thread Cain, Mark
This is pretty obscure but try adding an '&' to 'Save': clicker.clickWindowsButton('File Download', '&Save') --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Ciarlillo Sent: Sunday, December 03, 2006 9:37 AM To: wtr-general@rubyforge.or

Re: [Wtr-general] Extreme slowdown moving from 1.4.1 to 1.5.1.1127

2006-12-11 Thread Cain, Mark
Are you running your tests from inside and IDE? I saw the same slowness moving from 1.4.x to 1.5.x when I ran (the same tests) from Komodo 3.5. It was less apparent from Eclipse though... --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf O

Re: [Wtr-general] Can't Control JavaScript PopUp Window....

2006-11-29 Thread Cain, Mark
What version of Watir are you using? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of san Sent: Wednesday, November 29, 2006 5:49 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Can't Control JavaScript PopUp Window Basically When I Cli

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

2006-11-28 Thread Cain, Mark
This has been answered many times. "The access is denied message usually appears when there is a frame ( or iframe) that is in a different domain. It's a security thing in the browser. If your script is working, I wouldnt worry about it." Many have endeavored to put these kinds

Re: [Wtr-general] Is there a way to make file_field.set faster?

2006-11-27 Thread Cain, Mark
Zeljko, this works for me and it is much faster because it uses the handle of the object. require 'watir/contrib/enabled_popup' $path = "C\:\\watir_bonus\\working\\MyDoc.txt" def startClicker( button , waitTime=5, user_input=nil) hwnd = $ie.enabled_popup(waitTime) # get a

Re: [Wtr-general] Table has no unique attributes

2006-11-27 Thread Cain, Mark
You could also just use table index. If you do a view source on the page, then do a f. Beginning at the top of the page, put 'mailto:[EMAIL PROTECTED] On Behalf Of Angrez Singh Sent: Thursday, November 23, 2006 9:46 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Table has no unique a

Re: [Wtr-general] [Wtr-General] Problem with set_text and dialog boxes

2006-11-22 Thread Cain, Mark
If you are using 1.5.1070 or newer (if not you can get it here http://wiki.openqa.org/display/WTR/Development+Builds) you can use: require 'watir/contrib/enabled_popup' $path = "C\:\\watir_bonus\\working\\MyDoc.txt" def startClicker( button , waitTime=9, user_input=nil)

Re: [Wtr-general] problem in entering values in javascript input box

2006-11-16 Thread Cain, Mark
This works for putting text into an JS promt(input) box: require 'watir\contrib\enabled_popup' def startClicker( button , waitTime=9, user_input=nil) hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClicker.new

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

2006-11-15 Thread Cain, Mark
It is 1-based ie.textField(:index, 1).set("I did it!") --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nathan Sent: Wednesday, November 15, 2006 12:28 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Find parent table index from a speci

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

2006-11-15 Thread Cain, Mark
If there is one I have never found it. What I have had to do was do a view source on the page. I then do f, enter 'mailto:[EMAIL PROTECTED] On Behalf Of John Lolis Sent: Wednesday, November 15, 2006 6:46 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Find parent table index from a specif

Re: [Wtr-general] Problems with the watir email list?

2006-11-15 Thread Cain, Mark
I have had some similar problems in the past. As it turned out the server IP the forum comes from was on the Spam Block list for the entire license class (if I said that right) any way, I had to have the cyber-security guy open up the spam filter to allow the specific IP for the forum. Problem so

Re: [Wtr-general] Running Watir from FoxPro 9

2006-11-14 Thread Cain, Mark
Try require 'watir' ... @ie = Watir::IE.new Instead of @ie = WIN32OLE.new('InternetExplorer.Application') You could alternatively edit the setup.rb file to be for your tests anh just require it $ie and the logger are both initialized in that file. Also, take a l

Re: [Wtr-general] Using watir to control JavaScript popups

2006-11-13 Thread Cain, Mark
Which version of Watir are you using?   --Mark   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Garry West Sent: Monday, November 13, 2006 5:04 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Using watir to control _javascript_ popups   I am n

Re: [Wtr-general] startClicker

2006-11-10 Thread Cain, Mark
What you’re seeing is correct.  What is happening with the command prompt window it is scrolling through all of the active windows objects on your machine trying to match the window title bar text.  The clicker starts a new process (command prompt window) since a JS alert is modal otherwise

Re: [Wtr-general] modal dialogs in IE 7.0

2006-11-08 Thread Cain, Mark
ows Internet Explorer", but it works if you only change the one I mention above. Thanks, -Dara -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark Sent: Thursday, October 26, 2006 10:02 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-ge

Re: [Wtr-general] WinClicker - too many callbacks are defined

2006-10-27 Thread Cain, Mark
This is a shot in the dark but did you try explicitly setting the WinClicker object w to nil after the popup is dismissed? ... if (hwnd) w = WinClicker.new w.makeWindowActive(hwnd) w.clickWindowsButton_hwnd(hwnd, "OK") w = nil end ... OR You could create the WinClicker object when the

Re: [Wtr-general] Question from a newbie

2006-10-26 Thread Cain, Mark
: Thursday, October 26, 2006 11:02 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Question from a newbie Cain, Mark wrote: > Forgive me, but yes (I my opinion) you did. Is this forum for a ruby > framework that is exclusively for IE? And doesn't ALL the tests that > are w

Re: [Wtr-general] modal dialogs in IE 7.0

2006-10-26 Thread Cain, Mark
Dara, I had the same problem, when I started using IE7 a few months ago, and I am pretty sure I know exactly what is wrong. MS changed the popups title bar text in IE7 from 'Microsoft Internet Explorer' to 'Windows Internet Explorer'. So in watir\WinCLicker.rb you will need to change lines 113 an

Re: [Wtr-general] Question from a newbie

2006-10-25 Thread Cain, Mark
6 7:37 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Question from a newbie Cain, Mark wrote: > Excuse me but aren't we talking about IE here? Not that i was aware of. My understanding is that the topic at hand was whether the HTML generated by a web application was conformant

Re: [Wtr-general] Question from a newbie

2006-10-23 Thread Cain, Mark
't having a non-unique ID defeat the purpose of having an ID altogether? I agree that the "name" attribute is apparently not subject to the same restriction, though. ---Michael B. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark

Re: [Wtr-general] screenshots

2006-10-23 Thread Cain, Mark
Take a look at the screen capture module in the watir/screen_capture.rb. it should be able to do what you are asking... --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Phlip Sent: Saturday, October 21, 2006 8:12 AM To: wtr-general@rubyforge.org Su

Re: [Wtr-general] Question from a newbie

2006-10-23 Thread Cain, Mark
---Michael B. wrote: >>Congratulations: you've found a bug. There should not be two text fields >>with the same ID and the same name on the same page. It is not a bug because internally index is used to make all page objects unique. It may be poor design and/or lazy programming--I'll give you

Re: [Wtr-general] Question from a newbie

2006-10-18 Thread Cain, Mark
You can use index (it is 1 based) to access the correct text_filed. Obviously the first one would be (:index, 1), the second (:index, 2) and so on. You can look at the Watir API Reference (installed with Watir) to get the options available. You can also look at the unittests for some very good ex

Re: [Wtr-general] Need help to test Flash Application

2006-10-18 Thread Cain, Mark
You cannot use Watir to test Flash application.  There are tools like WinRunner that can use screen coordinates to input and click on objects, but that is very problematic because if anything on the screen changed—even a different monitor can affect it—your test will fail.  I have been told

Re: [Wtr-general] Wikipedia Article Feedback

2006-10-10 Thread Cain, Mark
I haven't had this issue using Ruby 1.8.5_21 and Watir 1.5.x. --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord Sent: Monday, October 09, 2006 10:04 PM To: wtr-general@rubyforge.org Subject: [Wtr-general] Wikipedia Article Feedback S

Re: [Wtr-general] Javascript Alert windows

2006-10-09 Thread Cain, Mark
was moved in the watir.rb file so that it is no longer found by enabled_popup. If you look in the watir.rb file for GetWindow and move those definitions into the enabled_popup.rb file then it should work fine. David Schmidt Matt Johnson wrote: > > > On 10/5/06, *Cain, Mark* <[EMAI

Re: [Wtr-general] Javascript Alert windows

2006-10-05 Thread Cain, Mark
The _javascript_ Alert, Confirm, Prompt, Security, File Save, File Download, File Upload, error message, and login (I think this is a complete list but there may be others) are all a special type of modal popup dialog window—there isn’t a different one.   In order to handle these types of p

Re: [Wtr-general] Javascript Alert windows

2006-10-04 Thread Cain, Mark
Try this: require 'watir\contrib\enabled_popup' # use click_no_wait to click the button that invokes the JS Alert $ie.button.click_no_wait hwnd = ie.enabled_popup(5) # get a handle if one exists if (hwnd)# yes there is a popup w = WinClicker.new

Re: [Wtr-general] unable to use Click_no_wait on buttons inside a frame.

2006-10-03 Thread Cain, Mark
This (I believe) was fixed 1095.  You can download the latest gem at: http://wiki.openqa.org/display/WTR/Development+Builds   --Mark   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Ark Sent: Monday, October 02, 2006 2:53 PM To: wtr-general@rubyfor

Re: [Wtr-general] how to submit javascript clickButton ?

2006-09-25 Thread Cain, Mark
You might want to include more HTML so people can see what you are working with. It is hard to help you without more information. What object do the users click on to submit the form? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of john Sent: Mon

[Wtr-general] What happened to the enabled_popup method?

2006-09-18 Thread Cain, Mark
What happened to the enabled_popup method? I have been using it quite effectively up through 1081 and in 1084 it is gone. Was this replaced by a better more robust method, or is there a preferred method to replace this functionality? I know Watir is being changed to add new features, and fix bug

Re: [Wtr-general] Click_no_wait error inside nested/sub frames

2006-09-18 Thread Cain, Mark
icket. Bret On 9/15/06, Cain, Mark <[EMAIL PROTECTED]> wrote: > > > > > > I am getting this error: > > > > 1) Error: > > test0_Acquire_Add_Comments(TC_Acquire_New): > > SystemStackError: stack level too deep > > C:/ruby/lib/ruby/site_ru

[Wtr-general] Click_no_wait error inside nested/sub frames

2006-09-15 Thread Cain, Mark
I am getting this error:   1) Error: test0_Acquire_Add_Comments(TC_Acquire_New): SystemStackError: stack level too deep     C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2574:in `attach_command'     C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2574:in `attach_command'     C:/ruby/lib/ruby/site

Re: [Wtr-general] using Watir for single-user performance testing

2006-09-13 Thread Cain, Mark
Yes.  What I do is write out to a file page load times before and after application changes.  I have to rename the output file between runs. It is pretty simplistic but need some down and dirty perf numbers.   require 'date'   def test_myPerfTestCase   $start = DateTime.now      

Re: [Wtr-general] Handling (Browser Security Driven?) Modal Dialog

2006-09-11 Thread Cain, Mark
id Schmidt Sent: Monday, September 11, 2006 11:34 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Handling (Browser Security Driven?) Modal Dialog   Cain, Mark wrote: > Will this handle modal windows and JS popups now?  Has that modal window > code been merged into the main bran

Re: [Wtr-general] Handling (Browser Security Driven?) Modal Dialog

2006-09-11 Thread Cain, Mark
Will this handle modal windows and JS popups now? Has that modal window code been merged into the main branch now? --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Schmidt Sent: Monday, September 11, 2006 9:07 AM To: wtr-general@rubyforge.or

Re: [Wtr-general] Error clicking a button...

2006-09-05 Thread Cain, Mark
ir_bonus/working/PER/tc_PER_Significant.rb:261:in `test5_ca' --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord Sent: Tuesday, September 05, 2006 12:57 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Error clicking a button..

Re: [Wtr-general] Error clicking a button...

2006-09-05 Thread Cain, Mark
y not waiting long enough? Bret Cain, Mark wrote: > This was code I wrote awhile ago (when $ie.wait didn't work right) and > was getting back to update. > > The call to $ie.wait? didn't work but $ie.wait did (seems to be a bit > faster then before). > > I still get

Re: [Wtr-general] Error clicking a button...

2006-09-05 Thread Cain, Mark
This was code I wrote awhile ago (when $ie.wait didn't work right) and was getting back to update. The call to $ie.wait? didn't work but $ie.wait did (seems to be a bit faster then before). I still get the same error message I originally posted until I put call that reloads the page in, and s

Re: [Wtr-general] Error clicking a button...

2006-09-05 Thread Cain, Mark
What appears to be happening is the $ie object is not retaining the page objects during the attachment to the non-modal window (I am probably not describing this right).  Because when I put these two line of code: table = $ie.table(:index, 8)   table[1][5].click   Immediately after

Re: [Wtr-general] I am a newb

2006-09-05 Thread Cain, Mark
Make sure the default ruby install directories (bin and lib) are in the PATH environment variable. The ruby installer should have done this by default, but maybe it didn't. For me it is: C:\ruby\bin;c:\ruby\lib Hope this helps, --Mark -Original Message- From: [EMAIL PROTECTED]

Re: [Wtr-general] I am a newb

2006-09-01 Thread Cain, Mark
Using :index it doesn't. What it is doing if finding the Xth button from the top of the page (you could count them from view source). I have to use this quite often in the applications I test because of auto-generated page elements which use the same button attributes (id, name, and values) for a

Re: [Wtr-general] I am a newb

2006-09-01 Thread Cain, Mark
When buttons all have the same names and id etc, you will need to use $ie.button(:index, x).click where x is the 1-based index of the button you want to click (from the top down). So if there are 3 cancel buttons on the page and you want to click the 2nd one then your code will look like this:

Re: [Wtr-general] Error clicking a button...

2006-08-31 Thread Cain, Mark
windows closes then only a very small part of the object show in the output, and then the error.   --Mark   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark Sent: Thursday, August 31, 2006 10:46 AM To: wtr-general@rubyforge.org Subject: [Wtr-general

[Wtr-general] Error clicking a button...

2006-08-31 Thread Cain, Mark
I am getting the following error when I click a ‘Save’ button on a page.  The application has several tabbed pages and on each is the same ‘Save, Submit, and Clear’ button pattern.  The other tab pages click the save button without error.  This error occurs after attaching and closing a Non

Re: [Wtr-general] How to check for opened IE windows?

2006-08-09 Thread Cain, Mark
Do you see this "-- Web Page Dialog" in the title bar of your popup pages? If yes then you are dealing with a modal web page and you will NOT be able to attach the normal way using Watir. --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Sent:

Re: [Wtr-general] Proxy server login

2006-08-03 Thread Cain, Mark
Title: Proxy server login In IE there are several authentication settings.  Open IE >> Tools >> Internet Options and click the security tab.  Click the custom levels button and scroll down until you reach the User Authentication area.  Most applications authenticate to the currently logged

Re: [Wtr-general] german chars in the browser

2006-08-02 Thread Cain, Mark
This is probably totally obvious, but did you try any of these: %q/Geben Sie Ihre Telefonnümmer (tags ber)/ %Q!Geben Sie Ihre Telefonnümmer (tags ber)! %Q{Geben Sie Ihre Telefonnümmer (tags ber)}   Also, make sure your font set actually has fonts for those characters.

Re: [Wtr-general] IE7 and Popups

2006-07-25 Thread Cain, Mark
PROTECTED] On Behalf Of Cain, Mark Sent: Tuesday, July 25, 2006 9:45 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] IE7 and Popups   I have recently started having to regression test all our web applications using IE7 beta3.  Most everything seems to work except pop-ups (Confirms, Alerts,

[Wtr-general] IE7 and Popups

2006-07-25 Thread Cain, Mark
I have recently started having to regression test all our web applications using IE7 beta3.  Most everything seems to work except pop-ups (Confirms, Alerts, and Prompts).  This part of my scripts has worked well using the latest IE6 version, but does not seem to work in IE7.  Anyone else se

Re: [Wtr-general] for loop syntax??

2006-07-19 Thread Cain, Mark
You will need to these: require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir/testcase' I usually add the setup.rb from the unittest directory instead because these requires are already in it. --Mark -Original Message- From: [EMAIL P

Re: [Wtr-general] selecting multiple values from on list and passing itto other list

2006-07-19 Thread Cain, Mark
You could do something like this:     dbList = $ie.select_list( :name, 'assigned').getAllContents     for dbl in dbList     $ie.selectBox( :name, 'assigned').select("#{dbl}")   end   Hope this helps,   --Mark   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTE

Re: [Wtr-general] Install problem?

2006-07-18 Thread Cain, Mark
n two different Windows XP PCs (one SP1, the other SP2).    Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 8:14 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Install problem? I have always h

Re: [Wtr-general] Install problem?

2006-07-18 Thread Cain, Mark
Title: Install problem? I have always had to install rubygems for a new ruby install.   Get the gem here: http://rubyforge.org/projects/rubygems/   Download it somewhere.  Open a command prompt and navigate to where you downloaded it.  Type gem install rubygems*.gem   This fix the sa

Re: [Wtr-general] Getting problem in calling click event where variousbuttons have the same name

2006-07-18 Thread Cain, Mark
Starting at the topmost delete button, count them until you get to the desired button.   $ie.button(:index,3).click --  would click the third from the top delete button on the page.   --Mark   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of VIKASH KUMAR

Re: [Wtr-general] Attaching a Popup

2006-07-18 Thread Cain, Mark
What you are trying to do can't be done with the version of Watir.rb you are using because the page you are trying to attach to is a Modal window. Try this one at: https://svn.openqa.org/svn/watir/branches/modal_dialog/watir/ (you will also need the files from the Watir folder--the IEDialog and Wi

[Wtr-general] Error running 1.5.1.1053

2006-07-10 Thread Cain, Mark
After installing 1.5.1.1053 I get this error:   C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1459: undefined method `exists' for class `Watir::IE' (NameError) from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from C:\watir_bonus\working\setup.rb:2 from C:/ruby/lib/ruby

Re: [Wtr-general] File Download Pop-Ups

2006-06-29 Thread Cain, Mark
I ended up having to put a sleep 2 in winClicker to get this to click the button.  At approximately line 299 in WinClicker.rb—this section:   if d != -1 makeWindowActive(hwnd) è    sleep 2 clickButtonWithHandle(d) else   After I add

Re: [Wtr-general] Did the implementation for contains_text change?

2006-06-27 Thread Cain, Mark
I was attempting to use text.include? like:  $ie.text_field(:name, "MyText").text.include? “My text to verify”   And I get this message:  “warning: parenthesize argument(s) for future version”   Am I getting this because I am using “text.include?” incorrectly or something else?   Th

Re: [Wtr-general] JS pop-up trouble, new methods in 1.5.1?

2006-06-19 Thread Cain, Mark
Cut and paste this method in your script exactly as is:   # method to click JS popups def startClicker( button , waitTime = 3)   w = WinClicker.new   longName = $ie.dir.gsub("/" , "\\" )   shortName = w.getShortFileName(longName)   c = "start ruby #{shortName }\\watir\\clickJSDialog.

Re: [Wtr-general] very neat trick with Ruby system() (or any otherlanguage on Windows)

2006-06-15 Thread Cain, Mark
I updated my Watir this morning to the most current and when I ran my script that used the click_no_wait I get this error:   NameError: undefined local variable or method `attach_command' for #     C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1189:in `eval_in_spawned_process'     C:/ruby/lib

  1   2   3   >