#47 Don't retrieve element markedForRemove via findElementByName

open
nobody
General (44)
5
2012-08-28
2011-01-06
Anonymous
No

Methods like findElementByName(...) or findControl(...) sould not return element that are marked for removal

For now if you do something like this :


Element elt1 = screen.findElementByName( "toto" );
elt1.marfForRemoval();

ImageCreator creator = new ImageCreator();
creator.setId( "toto" );
[...]
Element elt2 = creator.create( ... );

Element elt3 = screen.findElementByName( "toto" );

elt3 == elt1 and you will have to wait for elt1 to be actually deleted before you can access to elt2 via methods like findElementByName( ... );

Discussion