i think you can do this, Id just question why you want to do this. body_div = ie.div(:id, 'EditorBody') body_div.document.innerText='Hellow World!'
is whtat I think you need Paul On Mon, Dec 1, 2008 at 7:55 AM, Nathan Lane <[EMAIL PROTECTED]> wrote: > You must have some kind of JavaScript support in your Web Application to do > that -- Watir just controls the browser -- it doesn't provide a way to > manipulate your web page -- your web page must be all-inclusive of itself, > so if you want your DIV to be able to have text added, then your web page > must be able to do that without Watir. > Nathan > > On Fri, Nov 28, 2008 at 1:39 AM, Anders <[EMAIL PROTECTED]> wrote: > >> >> I need to assign a text value as the content of a Div, very similar to >> Watir gmail example except, I don't have an iframe, just a Div, here >> is the gmail example: >> >> # a body element. So, save the iframe in a var, then set the >> innerText >> # property of the iframe's body element. >> mail_body_frame = canvas_frame.frame(:index, 1) >> # TODO: there must be a friendlier way to do this, while still >> avoiding >> # hardcoding of any unfriendly identifiers. Does Watir need a body >> method? >> mail_body_frame.document.body.setproperty('innerText', >> mail_body_text) >> >> How do I accomplish the last part for a Div? >> >> body_div = ie.div(:id, 'EditorBody') >> body_div.setproperty('innerText', edit_content) -- this of course >> doesn't work >> ie.div(:id, 'EditorBody').set(edit_content) -- nor does this. >> >> I would appreciate any suggestions, I just got started with watir, >> what a great tool! >> >> >> > > > -- > Nathan Lane > Home, http://www.nathandelane.com > Blog, http://nathandelane.blogspot.com > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---