1

I am trying to run an e2e test with TestCafe and the scenario is that when user press the keys 'CTRL+SHIFT+ENTER' it should trigger an event. it works when i use the keyboard but not within the E2E. Thank you for your help.

the command i use is :

t.keypres('ctrl+shift+enter');
Vladimir A.
  • 2,202
  • 2
  • 10
  • 28

1 Answers1

2

The code you are using seems incorrect. Try

await t.pressKey('ctrl+shift enter');

Refer https://devexpress.github.io/testcafe/documentation/test-api/actions/press-key.html

VysakhMohan
  • 567
  • 3
  • 9
  • 1
    Code only answers are not as useful as answers that document the code or have an detailed explanation on why this code is the solution to the question. – RyanNerd Feb 19 '20 at 19:28
  • @RyanNerd Thank you for the feedback. I have added a link to refer the explanation – VysakhMohan Feb 20 '20 at 05:54
  • 1
    @RyanNerd thank you for your reply. I tried all this combinations without success 'ctrl+shift+enter' 'ctrl+shift enter' 'ctrl shift enter' – Mazouzi Zakaryae Feb 20 '20 at 09:53