[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

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

2006-10-24 Thread Ethan Jewett
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).frame(linksFrame).link(:id, link_id).click Is this a known issue? I don't see

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

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 to click an object twice and then make it flash

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?

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 that in 1.5.1127, you can also

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. My

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

2006-12-15 Thread Ethan Jewett
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 decent approach. Ethan On 12/14/06, Ethan Jewett [EMAIL PROTECTED] wrote: Akash

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

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 out

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] 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

[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 theory

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 on a

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

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

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,