Thanks, Bill. This looks like what is going on here.

Is there any more details or examples of how I may use the execscript of the
windows object?

Also if this in fact the problem is there a "show" that would display if
this is in fact what is my problem?

Thanks,
Karim



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Attebery, Bill
Sent: Wednesday, September 06, 2006 6:45 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Cannot access input element


I also found that with Ajax that the javascript event handling may get
handled by the window object and not the dom.  One of our developers was
playing with the google ajax tree, I could find the objects in the tree
(they were table elements inside a div) that I wanted to click, but
there was no onClick event and clicking them through watir didn't work
-- I had to use the execScript method of the window object.  Seems that
this was somehow building the event handler on the fly and clicking
through watir API wasn't the same as actually clicking the tree entry
manually -- a bit over my head how/why but just fyi.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Schmidt
> Sent: Wednesday, September 06, 2006 12:13 AM
> To: wtr-general@rubyforge.org
> Subject: Re: [Wtr-general] Cannot access input element
>
> 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
> active DOM.
>
> As to why the button isn't being clicked, it isn't clear from
> the HTML below, but perhaps there is something in the
> onClick() handler that aborts the effects of the click.  One
> thing I've done in our web scraping applications is to
> re-write the HTML before clicking to prevent some
> un-necessary events from firing.
>
> David
>
> [EMAIL PROTECTED] wrote:
> > No it is a div with absolute position.
> >  
> >> Sounds like frames to me. True?
> >>
> >> [EMAIL PROTECTED] wrote:
> >>    
> >>> Hey all,
> >>>
> >>> I have a form which I click on to perform an action.
> >>>
> >>> I get a result back from the action and a screen displays
> with an OK
> >>> option.
> >>>
> >>> Inspecting the code through view source does not show me
> any input
> >>> tags, yet when I download Dev tools for firefox and view the
> >>> generated source I see the elements like
> >>>
> >>>
> >>> <div class="alphababe_buttons">
> >>> <input value="OK" onclick="Dialog.cancelTalker()"
> class="cancel_button"
> >>> type="button"></div>
> >>>
> >>> but if I add
> >>> ie.button(:value,"OK").click
> >>> nothing happens
> >>>
> >>> Any help would be much appreciated
> >>>      
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>

The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC.  TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.

This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to