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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
20 matches
Mail list logo