Hello.
unique_number is an method for Watir::Element and it's declaration is
(for Watir 1.6.2) at element.rb on line 88 - in short, it is just a
wrapper for ole_object.invoke('uniqueNumber').
For debugging the reason of the failing of click_no_wait, I'd suggest
you to modify method called eval_in_spawned_process which is declared
in page_container.rb on line 50. Instead of line:
exec_string = "start rubyw -e #{(load_path_code + '; ' +
ruby_code).inspect}"
try:
exec_string = "ruby -e #{(load_path_code + '; ' + ruby_code).inspect}"
Then you should see the error message (if any) on your console.
If that doesn't help, then you could also add this line just before
system(exec_string):
File.open("c:/click_no_wait.txt", "w") {|f| f.puts exec_string}
Now open the text file and execute this long command from your command
line directly to see if you get any error messages or if anything
happens. You could modify this command to output some additional debug
information like browser url, browser title or html or whatsoever so
you know that it can attach to correct window (and not to that other
tab for example).
Hopefully it helps.
Jarmo
On Feb 5, 8:50 pm, Alan Baird <[email protected]> wrote:
> Yeah...I know, you all probably are rolling your eyes already about another
> click_no_wait problem, but this isn't a problem, it's a statement. I don't
> know how to fix it but my co-worker James and I just spent a while trying to
> figure out why click_no_wait wasn't working in his script. To make a long
> story short, the problem was that he had another tab open in the window he
> was trying to perform click_no_wait on. Closing that tab caused the script
> to work perfectly.
>
> I did a little search first and couldn't find anyone else that had run across
> this so I'm sending it to the list as a sort of public service announcement.
> I would try and troubleshoot this further but I am mystified by the following
> in click_no_wait:
>
> object = "#{self.class}.new(self, :unique_number, #{self.unique_number})"
> @page_container.eval_in_spawned_process(object + ".click!")
>
> Where does unique_number come from anyway? It doesn't appear to be a Watir
> method and I couldn't find it in Kernel, Class or Object classes in Ruby.
> Anyway, I imagine it has something to do with the fact that IE can't find the
> object to click on in the spawned process because it can't choose between the
> two pages...but, that's just a guess. It could be specific to my webpage as
> well.
>
> The moral of the story is, if click_no_wait isn't working for you in IE7, it
> may be because you have another tab open.
>
> Alan
>
> This email message and any attachments are for the sole use of the intended
> recipients and may contain proprietary and/or confidential information which
> may be privileged or otherwise protected from disclosure. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not an
> intended recipient, please contact the sender by reply email and destroy the
> original message and any copies of the message as well as any attachments to
> the original message.
--
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general