0
0
Cypresstesting~10 mins

cypress-real-events for native events - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the cypress-real-events plugin correctly.

Cypress
import '[1]';
Drag options to blanks, or click blank then click option'
Acypress-real-events/plugin
Bcypress-real-events/support
Ccypress-real-events/core
Dcypress-real-events/utils
Attempts:
3 left
💡 Hint
Common Mistakes
Importing from plugin instead of support.
Using incorrect path like core or utils.
2fill in blank
medium

Complete the code to trigger a native click event on a button with id 'submit'.

Cypress
cy.get('#submit').[1]();
Drag options to blanks, or click blank then click option'
AclickReal
BclickNative
CnativeClick
DrealClick
Attempts:
3 left
💡 Hint
Common Mistakes
Using standard click() instead of realClick().
Using incorrect command names like clickReal.
3fill in blank
hard

Fix the error in the code to type text 'hello' using native keyboard events.

Cypress
cy.get('input').[1]('hello');
Drag options to blanks, or click blank then click option'
ArealType
BtypeNative
CnativeType
DtypeReal
Attempts:
3 left
💡 Hint
Common Mistakes
Using typeReal instead of realType.
Using standard type() which does not trigger native events.
4fill in blank
hard

Fill both blanks to trigger a native hover and then a native click on a button with class 'btn'.

Cypress
cy.get('.btn').[1]().[2]();
Drag options to blanks, or click blank then click option'
ArealHover
BhoverReal
CclickReal
DrealClick
Attempts:
3 left
💡 Hint
Common Mistakes
Using hoverReal instead of realHover.
Using clickReal instead of realClick.
5fill in blank
hard

Fill all three blanks to chain native events: focus, type 'test', and blur on an input with name 'email'.

Cypress
cy.get('input[name="email"]').[1]().[2]('test').[3]();
Drag options to blanks, or click blank then click option'
ArealFocus
BrealType
CrealBlur
DfocusReal
Attempts:
3 left
💡 Hint
Common Mistakes
Using focusReal instead of realFocus.
Using standard type() instead of realType.
Using blurReal instead of realBlur.