[Wtr-general] Error selecting links within nested iFrame?

2006-10-23 Thread Ethan Jewett
Hi, I'm running Watir 1.4.1 and Ruby 1.8.4. I'm getting UnknownObjectException when trying to click a link within an iframe within a frame. Commands as follows: This command succeeds: $ie.frame("buttonFrame").frame("linksFrame").contains_text(/CVS Revision/) These commands fail with the Unkno

Re: [Wtr-general] Error selecting links within nested iFrame?

2006-10-24 Thread Ethan Jewett
n On 10/23/06, Bret Pettichord <[EMAIL PROTECTED]> wrote: > Ethan Jewett wrote: > > These commands fail with the UnknownObjectExceptions: > > $ie.frame("buttonFrame").frame("linksFrame").link(:text, "test1").click > > $ie.frame("buttonFrame&

Re: [Wtr-general] Error selecting links within nested iFrame?

2006-10-25 Thread Ethan Jewett
Thanks Paul, for confirming that this works. I'll close my bug. The problem I was seeing originally must be unrelated to the click method on links in frames. I'm trying to test pages generated by SAP WebDynPro ABAP components, which is a real pain, so it's likely that I missed something in writi

Re: [Wtr-general] Error selecting links within nested iFrame?

2006-10-26 Thread Ethan Jewett
Indeed it would. Thanks for the catch : ) Ethan On 10/26/06, Ċ½eljko Filipin <[EMAIL PROTECTED]> wrote: > On 10/26/06, Ethan Jewett <[EMAIL PROTECTED]> wrote: > > That way, if I'm not mistaken, one could do things > > like ie.element(*).flash.click.click t

Re: [Wtr-general] Checking whether images inside a table are enabled or disabled

2006-12-01 Thread Ethan Jewett
Vijay, It is hard to tell what, exactly, you are looking for without an example of what an "enabled" object looks like *and* what a "disabled" object looks like. However, it looks to me like Watir 1.5.1.1127 supports the following methods for every object on a web-page: exists? enabled? attribut

Re: [Wtr-general] "abnormal program termination" error message while playing back a script

2006-12-06 Thread Ethan Jewett
Vijay, Gem should be in whatever folder Ruby is in. It sounds like the ruby/bin/ folder is not in your path. At the command prompt, you can't run "gem" or "ruby -h". Can you run these commands with their full paths, like "C:\ruby\bin\gem"? Ethan On 12/6/06, vijay <[EMAIL PROTECTED]> wrote: >

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

2006-12-07 Thread Ethan Jewett
Nathan, I believe that in 1.5.1127, you can also loop through images and check the "class" attribute. @ie = Watir::IE.new @ie.goto(http://somepage.com) @ie.images.each do |image| if image.attribute_value("class") == "btn_viewResults" # Image found else # This image isn't the one

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

2006-12-07 Thread Ethan Jewett
Actually, of course it does regular expression matches, they're just regular Ruby regular expressions because there's no need to do a regular expression match in the .attribute_value method call. On 12/7/06, Ethan Jewett <[EMAIL PROTECTED]> wrote: > Nathan, > > I believe

Re: [Wtr-general] How to handle javascript pop ups from drop down lists

2006-12-14 Thread Ethan Jewett
Akash, Hopefully someone has a simpler solution, but my solution was to mixin (using a module) a new method to the offending class (in your case "SelectList") called select_no_wait(item). The contents of this method would be the same as the select(item) method, but without the @container.wait. M

Re: [Wtr-general] How to handle javascript pop ups from drop down lists

2006-12-15 Thread Ethan Jewett
ggestion: All action methods take an optional hash as a parameter, allowing for click(:no_wait => true) to have the same behavior as click_no_wait. In Akash's case, he could use select(item, :no_wait => true). I'd be happy to contribute some test cases if this sounds like a decen

Re: [Wtr-general] Referencing dynamically generated objects

2007-01-04 Thread Ethan Jewett
Bret, It looks to me like the following piece of code in watir.rb (after the second method of the Watir module) is causing rdoc to stop parsing at that point. # add an error checker for http navigation errors, such as 404, 500 etc NAVIGATION_CHECKER = Proc.new do |ie| if ie.document.frame

Re: [Wtr-general] Installation Problem

2007-02-02 Thread Ethan Jewett
It's been a while since I tried an executable installer so I'm not sure about your specific problem. It looks like you've got a space in your path, which can cause problems in some scripts. As with all things Ruby, it tends to be easier to go the "Ruby Way" and use the gem installer. Figuring ou

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

2007-02-03 Thread Ethan Jewett
Vijay, It looks like you've got the wrong frame. frame(:index,1).html just contains a hidden input, so it probably isn't the frame that is displayed. Maybe try frame(:index,2). If you methodically go through all frames and subframes in the modal, you'll find the one you want eventually. There

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

2007-02-06 Thread Ethan Jewett
As mentioned in a thread going on at the same time as this one, ActiveRecord is not Rails. It can be run alone and can be installed as a gem ("gem install activerecord"). I suppose it could be considered a rail, or maybe a tie . . . In any case, it does have an SQLServer adapter. See http://api

Re: [Wtr-general] ci-reporter question

2007-02-27 Thread Ethan Jewett
"gem" replaced "require_gem", sort of - http://redhanded.hobix.com/bits/require_gemIsDeprecated.html However, you seem to have a recent enough version of rubygems that this shouldn't be a problem. Maybe there's a missing require 'rubygems' somewhere? Ethan On 2/27/07, Bret Pettichord <[EMAIL PR

[Wtr-general] Wait issue with file_field.set, solution

2007-03-07 Thread Ethan Jewett
I think that the addition of the "click" to file_field.set in this change (see thread below) is causing one of my tests to hang during the @container.wait in the "click" method. However, this problem didn't show up until after the changes to the wait functionality in mid-February. Or so my theor

Re: [Wtr-general] Tables nested in a div

2007-03-16 Thread Ethan Jewett
John, I believe the .tables method returns an array of all the tables within div, so .tables[0] will return the first table in the div. Try: mainFrame.div(:id, "menuId").tables[1].click Ethan On 3/15/07, John Lloyd-Jones <[EMAIL PROTECTED]> wrote: > I have a tricky page where I need to click o

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

2007-03-21 Thread Ethan Jewett
Oscar, In my experience, the easiest thing to do is to hack up your "goto" method to allow for an option that doesn't wait for the page to load before passing back control to your script. Then, assuming you can get your username and password saved in your browser, you can just use AutoIT to send

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

2007-04-17 Thread Ethan Jewett
This (http://jira.openqa.org/browse/WTR-146) ticket and patch outlines a possible framework for dealing with this throughout watir. Might be a decent reason to vote for the feature on Jira. In the meantime, the method of modifying the methods in watir.rb in the patch should work for your problem

Re: [Wtr-general] Using an ie.table.each do |row| loop when the page in the ie window refreshes itself

2007-05-05 Thread Ethan Jewett
Ian, Reloading probably invalidates the table object, resulting in your "Access denied" error when ruby goes back for the next row in the table. Suggestion: Assuming that submitting and reloading doesn't affect the table layout, use rows.each_with_index to build an array of indices of relevant r

Re: [Wtr-general] Using an ie.table.each do |row| loop when thepage in the ie window refreshes itself

2007-05-08 Thread Ethan Jewett
maybe there's a way to store the indices of the buttons > it's going to click on within the array, rather than the rows > themselves. I tried buttons_to_click << row[5].link(:index,1), but that > doesn't work. > > Thanks, > Ian > > -Original Message-

Re: [Wtr-general] Using an ie.table.each do |row| loop when thepagein the ie window refreshes itself

2007-05-09 Thread Ethan Jewett
at the > preferred index behaviour should be. Perhaps that's why it's not in > there now? > > Thanks again, > Ian > > -----Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Ethan Jewett > Sent: Tuesday, May 08, 2007 9:18

Re: [Wtr-general] Modal dialog

2007-06-08 Thread Ethan Jewett
Does the following work? http://rubyforge.org/pipermail/wtr-general/2005-April/001461.html There are a couple of other examples on the FAQ including one that uses click_no_wait, which I think won't block the current process, though you'll have to handle timing issues yourself as with the startCli

Re: [Wtr-general] click link in iframe?

2007-06-08 Thread Ethan Jewett
Mihai, What is the code you are trying to use to click this menu link? It will need to be something like ie.frame(:index, 1).link(:text, "Link text here").click You might want to consider using something like the IE Developer Toolbar or Firebug to see what is inside the iframe. Ethan On 6/8/07