File tree 1 file changed +19
-0
lines changed
java/client/test/org/openqa/selenium
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 43
43
import static org .openqa .selenium .testing .TestUtilities .isOldIe ;
44
44
45
45
import org .junit .Test ;
46
+ import org .openqa .selenium .interactions .Actions ;
46
47
import org .openqa .selenium .support .ui .WebDriverWait ;
47
48
import org .openqa .selenium .testing .Ignore ;
48
49
import org .openqa .selenium .testing .JUnit4TestBase ;
@@ -123,6 +124,24 @@ public void testShouldFireMouseOverEventWhenClicking() {
123
124
assertEventFired ("mouseover" , driver );
124
125
}
125
126
127
+ /**
128
+ * This isn't quite right. We just loaded the page, and the native mouse is assumed to be at 0,0
129
+ * (or the last location the mouse was in) In order to click the element, the mouse will have to
130
+ * move towards it.
131
+ */
132
+ @ Test
133
+ @ Ignore (MARIONETTE )
134
+ public void testShouldFireMouseMoveEventWhenClicking () {
135
+ driver .get (pages .simpleTestPage );
136
+ // Move the mouse cursor to somewhere pretty far down the page
137
+ new Actions (driver ).moveToElement (driver .findElement (By .id ("span" ))).perform ();
138
+
139
+ driver .get (pages .javascriptPage );
140
+ clickOnElementWhichRecordsEvents (driver );
141
+
142
+ assertEventFired ("mousemove" , driver );
143
+ }
144
+
126
145
@ Test
127
146
public void testShouldNotThrowIfEventHandlerThrows () {
128
147
driver .get (pages .javascriptPage );
You can’t perform that action at this time.
0 commit comments