Quiz Yourself on Testing Events

Test your knowledge of how to simulate user interactions in your tests.

1

How do you simulate a left mouse click using the native API?

A)
myElement.simulate().leftClick();
B)
myElement.dispatchEvent(new MouseEvent('click', {button: 0}));
C)
myElement.leftClick();
D)
myElement.and(new MouseEvent('left'));
Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.