Re: [Wtr-general] Javascript Alert windows

2006-10-09 Thread David Schmidt
n 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* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > wrote: > > The JavaScript Alert, C

Re: [Wtr-general] Fwd: Managing the Watir Project -- Wikipedia entry

2006-09-28 Thread David Schmidt
ingness to promptly fix any problems that are shown. Sorry to vent, but I'm the author of the enabled_popup() method (which has been removed from watir.rb) and the one that helped Sun solve his problem when he presented it to the list. Statements welcoming contributions aren't entirely co

Re: [Wtr-general] nested tables

2006-09-23 Thread David Schmidt
022:0> That last row must be accessed via table 4. There have been some discussions about fixing this inconsistency and I've argued towards accuracy where row_count would only report the rows in it's OWN table, and sub-tables would be accessed for their row count, but others have

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

2006-09-18 Thread David Schmidt
Charley Baker wrote: > Mark, > > It's still available, but in the watir/contrib directory. In order > to use it, add > require 'watir/contrib/enabled_popup' > to your scripts. This is still a development version and so there will > be some bumps along the way. Sorry about the confusion, I'll try

Re: [Wtr-general] watir-1.5.1.1081.gem and popups

2006-09-15 Thread David Schmidt
It's been a while, but I think I found the code in WET or perhaps in someone's blog, but in any case my statement here was to acknowledge that I didn't write that code, and to give credit to the author. David Bret Pettichord wrote: > David Schmidt wrote: > >> bu

Re: [Wtr-general] watir-1.5.1.1081.gem and popups

2006-09-15 Thread David Schmidt
Brian, The modal_dialog method uses a Win32 call that locates any popup window using your current IE window's handle (HWND). I had originally coded the (:hwnd, hwnd) parameters in addition to the version with no parameters, but they really do the same thing since there can only be *one* acti

Re: [Wtr-general] WIN32OLERuntimeError: unknown property or method

2006-09-14 Thread David Schmidt
Jason, check out http://forums.openqa.org/thread.jspa?threadID=4012&tstart=0 for a routine I use to wait for a page to load, checking for possible popups at the same time. It uses Watir::until_with_timeout. See if that helps. David Jason Alexander wrote: > > Doing some Googling, it appears tha

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

2006-09-12 Thread David Schmidt
...it would fail with > this error on the assert call: " is not true." Why this should occur I > don't know and I find troubling...perhaps someone can explain why this works. > When the popup window is closed then control is returned to the original IE window. Since

Re: [Wtr-general] right click???

2006-09-11 Thread David Schmidt
Bret Pettichord wrote: > The problem in this case is exactly what it says. A DIV element in the > >> DOM doesn't *have* a fireEvent OLE call. (I just brought up IRB, >> attached to an IE window open to unittests/html/div.html, assigned the >> first DIV element to a variable and then had it sh

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

2006-09-11 Thread David Schmidt
Cain, Mark wrote: > Will this handle modal windows and JS popups now? Has that modal window > code been merged into the main branch now? > > --Mark > It still doesn't have all of the functions I added to the modal_dialog branch, like Element#visible?, but it should have most of the modal_dial

Re: [Wtr-general] right click???

2006-09-11 Thread David Schmidt
il irb(main):021:0> d = ie.div(:id, 'div1');nil => nil irb(main):022:0> d.document.ole_methods => [setAttribute, getAttribute, removeAttribute,... No fireEvent, as the error message below stated. Ċ½eljko, are you sure that the right click event was in the DIV and not in another

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

2006-09-11 Thread David Schmidt
Sun wrote: > Yes...the problem I have is that I have a corporate browser. I have in fact > "checked" this so that it should not reappear but it does anyway. Corporate > IT doesn't let us change the security levels for the browser so...that is > probably why the popups are forced. > > OK, than

Re: [Wtr-general] handle exhaustion

2006-09-08 Thread David Schmidt
What version of Watir are you running? David Phlip wrote: > Watirists: > > After running a test with Watir over and over again, my WinXP box > shows signs of "handle exhaustion". Simple windows and such don't > open. This shows that when Watir creates its secret Internet Explorer > object, and de

Re: [Wtr-general] How to discover and address items within nested frames.

2006-09-08 Thread David Schmidt
Here's a small hint which can make your Watir code more readable and a bit faster. When you're identifying an element that may may be many frames deep, or even deep within a single frame, save the element into a variable. This way Watir doesn't go through the entire search process every time y

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

2006-09-07 Thread David Schmidt
ve IE a chance to fire off a popup on the NEW page. Watir::until_with_timeout(90) { [EMAIL PROTECTED] or @ie.enabled_popup(0) } In any case, this should help you get past the point where you're having problems. David Schmidt Sun wrote: > I have a popup titled simply "Internet Exp

Re: [Wtr-general] Watir on Rails

2006-09-07 Thread David Schmidt
at the web server is already running? David Schmidt Dave Hoover wrote: > I have just released a Ruby on Rails Plugin that allows for easy Watir > testing in Rails. To install the plugin in your Rails project, > execute > > ./script/plugin install svn://rubyforge.org/var/svn/watir-

Re: [Wtr-general] Click Link In Table Based on Row and Column Numbers

2006-09-06 Thread David Schmidt
Be warned that this method will only work if there are no sub-tables contained in the rows searched. This is because row_count will show the number of rows in a single table, but ie.table[row][column] will find every row located in OR BELOW that table. So, if the cell at ie.table[1][1] contain

Re: [Wtr-general] Newbie Question: Verify and Then Click URL

2006-09-06 Thread David Schmidt
I see the problem here. In a regular expression the '+' character has special meaning. It indicates in this case that the previous character can be repeated one or more times. Thus, your regular expression would have matched "B8110002" or even "B8110002", but won't match a URL with a plu

Re: [Wtr-general] Cannot access input element

2006-09-05 Thread David Schmidt
The lack of any input tags in a view source is easy to explain. I've found that a view source will only show the *initial* HTML that was sent to the browser. Any changes due to AJAX or Dynamic HTML will not show up in a view source, but will show up using development tools which show you the

Re: [Wtr-general] Checking the Visibility of an element?

2006-09-05 Thread David Schmidt
Phil, I see from your personal e-mail to me that you've already found my wiki entry at http://wiki.openqa.org/pages/viewpage.action?pageId=1119. I was on vacation last week and will undoubtedly have some catching up at work, but I will look at your issues as soon as I can and hopefully have a

Re: [Wtr-general] Modal Dialogs via Remote Desktop on Win XP

2006-08-24 Thread David Schmidt
utton. The trick is to use the command line with the /console argument. *mstsc /v:servername /console* **Hope that helps, David Schmidt Lillis, Dara wrote: > I run my Watir tests on remote pc's. I would like to manage the remote > pc's using Remote Desktop, but encounter the fo

Re: [Wtr-general] Determining if control is hidden

2006-08-23 Thread David Schmidt
Done: http://wiki.openqa.org/pages/viewpage.action?pageId=1119 The wiki editing isn't exactly obvious, and it kept complaining about the page title I used. Feel free to pretty it up if you like, but there's an example of extending Watir up there now. David Charley Baker wrote: > Hi David, > >

Re: [Wtr-general] More details on cells not found by text

2006-08-23 Thread David Schmidt
Mike, That test works fine under 1.5.1.1079 so it may be a problem in 1.4.1 that's been fixed since. If you need to remain with 1.4.1 then perhaps you can try an alternate method to get to that cell? I don't have 1.4.1 loaded, but try ie.table(:index, 1)[1][1].exists? and see if that works in

Re: [Wtr-general] Subject:,Re: launch broswer as another user ?

2006-08-23 Thread David Schmidt
We've also had a need to start up multiple instances of IE, each in their own process. (This allows us to run multiple scraping sessions to the same site and not have the session cookies over-ride each other, as long as the cookies don't have an expiration date which writes them to the file sy

Re: [Wtr-general] Determining if control is hidden

2006-08-23 Thread David Schmidt
t.style.invoke('visibility') =~ /^hidden$/i return false end if object.style.invoke('display') =~ /^none$/i return false end if object.invoke('isDisabled') return false end rescue WIN32OLERuntimeError end object = object.parentElement end true end end David Schmidt

Re: [Wtr-general] RegEx && 151.1054

2006-08-23 Thread David Schmidt
Watir 1.5.1.1079 should fix this problem. A patch of mine improperly allowed a Regexp to be passed to DOM's getElementById() call. David Adrian Lewis wrote: > I think we got a problem with RegEx && watir 151.1054 > > this'll work fine > > def password_field;$ie.text_field(:name, 'password');en

Re: [Wtr-general] Solution for accessing showModal Dialogs yet?

2006-08-23 Thread David Schmidt
b scraping sessions on one Windows box with many modal dialogs and I'm not having any problems with simultaneous modal dialogs because I have click_no_wait attach by HWND instead of by window title. David Schmidt Bret Pettichord wrote: > James wrote: > >> I should note, this scr

Re: [Wtr-general] Setting Textbox throws unknown

2006-08-23 Thread David Schmidt
core tests now pass, including some new tests using regular expressions in :id and :name searches. David Schmidt Charley Baker wrote: > Actually I can tell you why this is happening, it's related to the > issue I was looking at yesterday, ie.element(:id, 'foo') actua

[Wtr-general] "DL::DLError too many callbacks defined" from winClicker.rb (with fix)

2006-07-31 Thread David Schmidt
emove the callback from the DL table. I've added that call to all of the winClicker.rb methods which use DL.callback and my testing confirms that I'm no longer having a problem with that exception. I've checked this fix into the 1

Re: [Wtr-general] Click on the Tab

2006-07-31 Thread David Schmidt
gt; > I tried with ie.cell(:text, /Par/).click > but its not working. > > Thanks > Meghanath > > -Original Message- > From: David Schmidt [mailto:[EMAIL PROTECTED] > Sent: Monday, July 31, 2006 2:33 PM > To: wtr-general@rubyforge.org > Cc: Chintakrindi Meghana

Re: [Wtr-general] Click on the Tab

2006-07-31 Thread David Schmidt
nywhere on the page with: ie.cell(:text, 'Parties').click You can also regular expressions in the search: ie.cell(:text, /Par/).click David Schmidt [EMAIL PROTECTED] Chintakrindi Meghanath wrote: > Hi > > I am trying to click a "Tab" in my application . I tried wi

[Wtr-general] Running Watir under Wine/CrossOver Office?

2006-07-10 Thread David Schmidt
I've seen comments here and there on the net about folks running Watir under Wine or CrossOver Office. I've been trying both and have been having some problems. I've installed the latest Ruby one-click-installer and added c:\ruby\bin to the Wine path, and confirmed that path: $ wine ruby

Re: [Wtr-general] Issue with gem 1.5.11037

2006-06-26 Thread David Schmidt
Zeljko, Your problem is that that second "require" should be "include Watir" (with no quotes). When you did the second require you got messages for all the constants that were being re-defined. David Zeljko Filipin wrote: > I do not know if this has any value: > > >gem list > > *** LOCAL GEMS

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

2006-06-15 Thread David Schmidt
Bret, The current method is quite a bit different than the method that I wrote, and I'm not sure it will be as flexible. (For example, you can't attach to a Frame the way you can to an IE or Modal window.) My method is designed to completely re-create the exact method string to get back to t

Re: [Wtr-general] Understanding WATIR

2006-06-14 Thread David Schmidt
Actually, that *is* supported. However, if you look a sample HTML element from a page I'm scraping you'll find a clue why that particular example didn't work: For text_fields, the current text in the field is contained in the "value" attribute. Thus: ie.text_field( :value, 'xyz' ) Should

Re: [Wtr-general] Understanding WATIR

2006-06-14 Thread David Schmidt
Manish, Since I've been digging around in this code I'll take a stab at answering your question. Currently, Watir does use a DOM call to build the element collections (like "tables", "cells", "rows", "links", etc). That call is getElementsByTagName() (http://msdn.microsoft.com/workshop/autho

Re: [Wtr-general] Wait for control to exist

2006-06-13 Thread David Schmidt
Yup, my bad. I just typed the wrong name out of habit. New name will be "wait_until". *SLAP* Ouch! OK, I've been punished. David Bret Pettichord wrote: > On 6/13/06, *David Schmidt* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Th

Re: [Wtr-general] Wait for control to exist

2006-06-13 Thread David Schmidt
Our solution is better than that. Bret already has a method that I've been using and it's generic enough that you can wait for just about anything. He's stated that he'll just be renaming it to "wait_for". On a web scraper I have there is an AJAX request that fires when one of the fields is c

Re: [Wtr-general] Problem finding a link URL with RegEx

2006-06-13 Thread David Schmidt
Adrian Rutter wrote: > Is it not possible to get the second link on a page? Something like: > > $ie.link(:text, 'New';:index, 2).click > It is currently possible to access the second link on a page, but not with a filter. '$ie.links[2]' will give you the second link on the page, and you can o

Re: [Wtr-general] Wait for control to exist

2006-06-13 Thread David Schmidt
How about the easy way. Just alias your nice "until_with_timeout" to "wait_until" so both names work and just use that your first format with the block. That way the block can contain any code that returns a boolean, which will allow Andy's request for multiple element support to work like:

Re: [Wtr-general] Wait for control to exist

2006-06-12 Thread David Schmidt
I called the function I wrote "wait_for", though I like your until_with_timeout method that uses yield better. Then we could do something like: wait_for(10) { ie.button(:value, 'OK') } or just do it as a function like wait_for( ie.button(:value, 'OK'), 10 ) We could just use your until_with_t

Re: [Wtr-general] Table Row Bug -- How to fix?

2006-06-09 Thread David Schmidt
Bret Pettichord wrote: > > inetdavid (6/8/2006 9:38:31 PM): Just found a problem with > row_count with embedded tables. row_count counts *all* the rows, > even rows in sub-tables, while show_tables shows the correct count > because it uses a different method. I've first added a test

Re: [Wtr-general] BUG: New IE windows share session state with existingopen windows

2006-06-06 Thread David Schmidt
There's another issue which may be affecting your test that is also NOT a Watir bug. Sessions are often set by having a server save a session ID cookie on the IE's PC. For IE, these cookies are saved in a per-user directory. If you run multiple IE's to the same site then the cookies can be o

Re: [Wtr-general] Determine HTML property

2006-06-01 Thread David Schmidt
Zeljko Filipin wrote: > ie.radio(:id, "id").readonly? > > On 6/1/06, *Adrian Rutter* <[EMAIL PROTECTED] > > wrote: > > > Hi, > > I have an HTML field that once saved becomes read-only > [readonly="true"]. > Apart from doing a regex on the source how can I

Re: [Wtr-general] Methods that can be used within a frame?

2006-06-01 Thread David Schmidt
Tyler, What I've done in the past is to create a new method, Element#html= which allows you to replace the outerHTML for any element: class Watir::Element def html=(new_html) assert_exists @o.outerHTML = new_html end end Unfortunately, when playing with your top level document t

Re: [Wtr-general] Methods that can be used within a frame?

2006-05-31 Thread David Schmidt
Tyler, I know this isn't supported right now. I did some investigation and I don't see a "navigate" function in the frame's OLE object (which is used by the base IE object in "goto"). I even tried to do a raw substitute in the IE document that contains the frameset, but was unable to find an

Re: [Wtr-general] 1.5 modal dialog. Syntax of supported tags ?

2006-05-30 Thread David Schmidt
at modal dialog. Assuming that the frame "main" has the button you want, you should be able to click on it by using: modal.frame('main').button(:text, 'Yes').click Let me know if that works for you. David Schmidt Neri, Marco wrote: > > Hi > > I'm runnin

Re: [Wtr-general] Need help reading a file

2006-05-25 Thread David Schmidt
kryptiq.com:8080/guardian/servlet/guardian/template/ItemChooser.vm?chooserType=CUSTOM_CONTRACT_DOCSET') > > id =test_site2.cell(:text, "Arbitration").id > > test_site2.radio(:name, "selectionids", id).set > > test_site2.image(:id,"btnChooseSelected").clic

Re: [Wtr-general] Need help reading a file

2006-05-25 Thread David Schmidt
so there would be no quotation marks around the variable name. The line to set the radio button should read: test_site2.radio(:name, 'selectionids', id).set David Schmidt [EMAIL PROTECTED] Jassi Akkal wrote: > Bret, > > Thanks for the help. But it is not working for me and &

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

2006-05-24 Thread David Schmidt
Bret Pettichord wrote: > On 5/24/06, *David Schmidt* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > This is the same problem that was occurring in wait(). The COM object > document method is called when the document method isn't available. &

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

2006-05-24 Thread David Schmidt
Bret, This is the same problem that was occurring in wait(). The COM object document method is called when the document method isn't available. I've seen this if a page or frame immediately kicks off a new page load before all the wait checks are complete or perhaps if the check is called be

Re: [Wtr-general] [question] Accesing images?

2006-05-23 Thread David Schmidt
o follow is the link following img2: Quitar Try: $browser_popup.frame('responseFrame').link(:id, 'quitar2').click to click the link following the img2 image. David Schmidt [EMAIL PROTECTED] Rodrigo Julian Martin wrote: > > Thanks for the answer Lonny, and sorry for

Re: [Wtr-general] Version discrepancy?

2006-05-23 Thread David Schmidt
7;m working on getting full modal dialog support and support for click_no_wait from sub-frames and modal dialogs. Note that this code will be merged into trunk once all the tests are done and the code is proven to work for all elements. David Schmidt [EMAIL PROTECTED] Mike Townley wrote: >

Re: [Wtr-general] frame error in waitreadyState

2006-05-19 Thread David Schmidt
Manish, It's a bit hard to tell exactly what's occurring without seeing the HTML or the Watir script involved, but I've seen this type of error before. It's a COM error trying to send a command to IE, and from the trace I'd guess it was a "wait" command. Since it was right after a click I'm

Re: [Wtr-general] need help with radio button

2006-05-18 Thread David Schmidt
there *is* a missing quote then perhaps you can click on it by just using the value as in: ie.radio(:value, '8bf19f48-9462-4285-90ef-241f4fd5f7f7').click (or .set) If there *is* a closing quote then either of those should work. David Schmidt [EMAIL PROTECTED] Jassi Akkal wrot

Re: [Wtr-general] WaitForObject

2006-05-18 Thread David Schmidt
Watir script and modify for your own use. (The current script calls our own log method so that will probably need to be changed.) Hope that helps. David Schmidt [EMAIL PROTECTED] Adrian Rutter wrote: > Hi, > > I was wondering if Watir had a method that will make the script wait until >

Re: [Wtr-general] [question] Passing a Parameter in XPATH for FireWatir?

2006-05-17 Thread David Schmidt
Wow, I'd always thought that single quotes prevented "variable expansion" and didn't realize that Ruby variable expansion does work inside single quotes so I had to try this. Looks like it will work if the *outer* quotes are double quotes, even if inside single quotes inside. However, it doesn

Re: [Wtr-general] Tricky select list

2006-05-17 Thread David Schmidt
George, You can do something like ie.select_list(:index, 1).select('All') to select the "All" option. I'm assuming here that this is the first select_list in the HTML since this is just a partial. If the select list had an id or name you could do something like ie.select_list(:id,

Re: [Wtr-general] Thoughts on modal dialog implementation in development Watir

2006-05-12 Thread David Schmidt
I got the SVN URL and checked out watir/trunk into RadRails, but I see that the repository is set up with what looks like "sub-projects". I tried to grab just the watir project directory (watir/trunk/watir) using SVN, but got the following error: svn: PROPFIND request failed on '/svn/watir

Re: [Wtr-general] Thoughts on modal dialog implementation in development Watir

2006-05-11 Thread David Schmidt
Bret Pettichord wrote: > On 5/11/06, *David Schmidt* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Bret and all, > > I was overjoyed to find the Watir::IE#attach_modal() method in the > current development tree and quickly started

[Wtr-general] Thoughts on modal dialog implementation in development Watir

2006-05-11 Thread David Schmidt
e at # this point, but I think we're on the right track! This needs more work before it's ready to be released, but I think this shows that the concept is valid and may be a better model for linking to modal dialogs? Bret and John, what are your thoughts? David Schmidt [EMAIL PROTECTED] ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Running Multiple Instances of IE

2006-05-10 Thread David Schmidt
ng some 'run as' parameter to specify the user for each Watir process. Hope that helps, David Schmidt [EMAIL PROTECTED] John Fitisoff wrote: > Help! I'm new to Watir, and am trying to get my > company to use it, but am running into a problem. I'm > trying to run multipl

Re: [Wtr-general] Trouble closing JavaScript pop-up invoked from a frame in Watir 1.5.0.945

2006-05-10 Thread David Schmidt
bject end array << "IE.attach(:hwnd, #{current_object.ie.HWND})" array.reverse.join('.') end This is NOT a complete solution, as I didn't look at images yet, only the buttons and links. Here's the snippet I added to attach_browser_window() in the case s

[Wtr-general] frame.html fails in development version

2006-05-10 Thread David Schmidt
I have some code which was using Frame#html which was inherited from Watir::IE in 1.4. In 1.5 this broke because Frame is no longer inherited from IE. I moved Watir::IE#html to the Container module and now it's working fine because both Watir::IE and Watir::Frame include Container.

Re: [Wtr-general] frame.html fails in development version

2006-05-10 Thread David Schmidt
I added a comment to that JIRA bug and can make a patch if necessary, though the fix is simply moving the html method from Watir::IE to the Container Module. David Schmidt Paul Carvalho wrote: > This is a known problem in 1.5. The description is perhaps not clear > enough to be foun