question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I.pressKey with multiple keys does not work

See original GitHub issue

What are you trying to achieve?

I want to select the whole content of a field. Given the following test

Scenario('I want to select the content of a field', (I) => {
  I.amOnPage('https://www.google.com/search?q=abc');
  I.click('[name=q]');
  I.pressKey(['Control','a']);
});

What do you get instead?

Instead of ‘abc’ beeing selected, I saw following behaviours in different tests:

  • nothing happens
  • as shown with google, it’s pasted in the field image

Details

  • CodeceptJS version: 2.0.1
  • NodeJS Version: 8.9.4
  • Operating System: Windows
  • WebDriverIO version: 5.2.0
  • Configuration file:
WebDriver: {
      host: isDocker() ? 'selenium-chrome' : 'localhost',
      port: isDocker() ? 24444 : 4444,
      url: config.url,
      browser: 'chrome',
      desiredCapabilities: {
        chromeOptions: {
          args: [
            '--enable-automation',
            '--disable-extensions'
          ]
        }
      },
      windowSize: '1920x1080',
      disableScreenshots: true
    },

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ndrsfrrcommented, Mar 13, 2019

Thanks guys! Didn’t know what to do and nobody seemed interested. Thanks @LukoyanovE for your PR!

1reaction
miraocommented, Mar 10, 2019

@LukoyanovE The issue is fixed in webdriver@5.7.1, thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I.pressKey with multiple keys does not work #1420 - GitHub
What are you trying to achieve? I want to select the whole content of a field. ... I.pressKey with multiple keys does not...
Read more >
Codeception pressKey ENTER does not work - Stack Overflow
If anyone still have problem with pressing Enter key, here is a solution: (if you are using Webdriver with Selenium) $I->pressKey('#input' ...
Read more >
Multiple keys are not working all of a sudden
If the same keys are not working on the on-screen keyboard, then this is a software issue . . . Open the Settings...
Read more >
What to do if your keyboard seems to duplicate keystrokes or a ...
I'm loving the model 01 in general but am having a few nigglie issues with it on my mac. I often get multiple...
Read more >
What is the expected behavior when holding down two keys ...
Anti-ghosting only comes into play when at least three keys are pressed — it's irrelevant for only two, so it doesn't matter here....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found