File tree 3 files changed +14
-15
lines changed
src/org/openqa/selenium/htmlunit
3 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ protected void get(URL fullUrl) {
554
554
555
555
private void resetKeyboardAndMouseState () {
556
556
keyboard = new HtmlUnitKeyboard (this );
557
- mouse = new HtmlUnitMouse (this , keyboard );
557
+ mouse = new HtmlUnitMouse (keyboard );
558
558
}
559
559
560
560
protected void pickWindow () {
Original file line number Diff line number Diff line change 26
26
27
27
import com .gargoylesoftware .htmlunit .ScriptException ;
28
28
import com .gargoylesoftware .htmlunit .html .HtmlElement ;
29
- import com .gargoylesoftware .htmlunit .html .HtmlInput ;
30
29
import com .gargoylesoftware .htmlunit .javascript .host .event .MouseEvent ;
31
30
import com .google .common .base .Preconditions ;
32
31
35
34
*
36
35
*/
37
36
public class HtmlUnitMouse implements Mouse {
38
- private final HtmlUnitDriver parent ;
39
37
private final HtmlUnitKeyboard keyboard ;
40
38
private HtmlElement currentActiveElement = null ;
41
39
42
- public HtmlUnitMouse (HtmlUnitDriver parent , HtmlUnitKeyboard keyboard ) {
43
- this .parent = parent ;
40
+ public HtmlUnitMouse (HtmlUnitKeyboard keyboard ) {
44
41
this .keyboard = keyboard ;
45
42
}
46
43
44
+ /**
45
+ * @deprecated as of 2.47.0, please use {@link #HtmlUnitMouse(HtmlUnitKeyboard)} instead
46
+ */
47
+ @ Deprecated
48
+ public HtmlUnitMouse (HtmlUnitDriver parent , HtmlUnitKeyboard keyboard ) {
49
+ this (keyboard );
50
+ }
51
+
47
52
private HtmlElement getElementForOperation (Coordinates potentialCoordinates ) {
48
53
if (potentialCoordinates != null ) {
49
54
return (HtmlElement ) potentialCoordinates .getAuxiliary ();
@@ -64,10 +69,6 @@ public void click(Coordinates elementCoordinates) {
64
69
moveOutIfNeeded (element );
65
70
66
71
try {
67
- if (!(element instanceof HtmlInput )) {
68
- element .focus ();
69
- }
70
-
71
72
element .mouseOver ();
72
73
element .mouseMove ();
73
74
Original file line number Diff line number Diff line change 34
34
import static org .openqa .selenium .testing .Ignore .Driver .MARIONETTE ;
35
35
import static org .openqa .selenium .testing .Ignore .Driver .SAFARI ;
36
36
37
+ import java .io .File ;
38
+ import java .io .IOException ;
39
+ import java .util .List ;
40
+
37
41
import org .junit .Test ;
38
42
import org .openqa .selenium .testing .Ignore ;
39
43
import org .openqa .selenium .testing .JUnit4TestBase ;
40
44
import org .openqa .selenium .testing .JavascriptEnabled ;
41
- import org .openqa .selenium .testing .NotYetImplemented ;
42
45
import org .openqa .selenium .testing .TestUtilities ;
43
46
import org .openqa .selenium .testing .drivers .SauceDriver ;
44
47
45
- import java .io .File ;
46
- import java .io .IOException ;
47
- import java .util .List ;
48
-
49
48
public class CorrectEventFiringTest extends JUnit4TestBase {
50
49
51
50
@ Ignore (value = {MARIONETTE })
@@ -126,7 +125,6 @@ public void testShouldNotThrowIfEventHandlerThrows() {
126
125
127
126
@ Ignore (MARIONETTE )
128
127
@ JavascriptEnabled
129
- @ NotYetImplemented (HTMLUNIT )
130
128
@ Test
131
129
public void testShouldFireEventsInTheRightOrder () {
132
130
driver .get (pages .javascriptPage );
You can’t perform that action at this time.
0 commit comments