File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
java/server/src/org/openqa/selenium/remote/server/handler Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import org .openqa .selenium .remote .server .Session ;
20
20
21
- public class ClearElement extends WebDriverHandler <Void > {
22
-
23
- private volatile String elementId ;
21
+ public class ClearElement extends WebElementHandler <Void > {
24
22
25
23
public ClearElement (Session session ) {
26
24
super (session );
27
25
}
28
26
29
- public void setId (String elementId ) {
30
- this .elementId = elementId ;
31
- }
32
-
33
27
@ Override
34
28
public Void call () throws Exception {
35
- getKnownElements (). get ( elementId ).clear ();
29
+ getElement ( ).clear ();
36
30
return null ;
37
31
}
38
32
39
33
@ Override
40
34
public String toString () {
41
- String element = "unknown element" ;
42
- try {
43
- element = String .valueOf (getKnownElements ().get (elementId ));
44
- } catch (RuntimeException e ) {
45
- // Be paranoid!
46
- }
47
- return String .format ("[clear: %s %s]" , elementId , element );
35
+ return String .format ("[clear: %s]" , getElementAsString ());
48
36
}
49
37
}
You can’t perform that action at this time.
0 commit comments