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

Key: WET-207
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Sowmyashree
Votes: 0
Watchers: 0
Operations

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

The Clone method of DomElementWrapper class throws an NullReferenceException when the includeparents option is selected

Created: 31/Aug/06 07:09 AM   Updated: 18/Jun/07 10:37 AM
Component/s: None
Affects Version/s: 0.9.8_beta1
Fix Version/s: Future

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
The method ::
  DomElementWrapper.Clone( bool includeParents , bool includeChildren)

throws NullReferenceException when includeParents option is set to true ...


All the objects are cloned including their parents until the "Browser" object is reached and the Exception is thrown because the parent of Browser is NULL


Checking whether the "ParentObject" is null
and By calling the Clone method on ParentObject only if it is not equal to null will fix this problem ...


Stack Trace ::

Script_assistant.test.DomElementWrapperTest.TestParentCloned : System.NullReferenceException : Object reference not set to an instance of an object.


 at Script_assistant.DomElementWrapper.Clone(Boolean includeParent, Boolean includeChildren) in D:\workingdir\trunk\src\DomElementWrapper.cs:line 136
   at Script_assistant.DomElementWrapper.Clone(Boolean includeParent, Boolean includeChildren) in D:\workingdir\trunk\src\DomElementWrapper.cs:line 136
   at Script_assistant.test.DomElementWrapperTest.CloneWithParent() in D:\workingdir\trunk\test\TestDomElementWrapper.cs:line 495




 All   Comments   Work Log   Change History      Sort Order:
Raghu Venkataramana - 02/Apr/07 10:15 PM
Not causing any problems in real usage. Put off fix to 'after 1.0'