History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-152
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Chris McMahon
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

change page content directly; alter the text value of a DIV

Created: 16/May/07 06:04 PM   Updated: 04/Jun/07 02:13 PM
Component/s: HTML Controls
Affects Version/s: Future
Fix Version/s: Future

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: all


 Description  « Hide
the editable part of wysiwig editors tend to have a frame that contains nothing but a DIV tag with a value something like "Replace this text"

Watir has no "set" method or "text" method for the contents of DIV tags. One can do

div = div(:class, 'editme').
div.locate
div.ole_object.innerText = "My text that I want to save"

but a) it's not elegant to use raw OLE and b) it breaks on mozilla-type browsers that use "textContent" instead of "innerText".

this issue is to add a convenient way to alter the pure page contents. Bret's syntax suggestion is
ie.div(...).text = 'Chris was here'




 All   Comments   Work Log   Change History      Sort Order:
Bret Pettichord - 04/Jun/07 02:13 PM
suggestion has merit