-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Keyboard presses are not working #10525
Replies: 1 comment · 5 replies
-
Please see the WebdriverIO docs: https://webdriver.io/docs/api/browser/keys , it has a clear example: import { Key } from 'webdriverio'
await browser.keys([Key.Tab]) |
Beta Was this translation helpful? Give feedback.
All reactions
-
I tried this and not working to me. Is it working on your machine? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Saying "not working to me" really doesn't help to give you further advice 😞 |
Beta Was this translation helpful? Give feedback.
All reactions
-
const Key = require('webdriverio');
}) Logs: Execution of 1 workers started at 2023-06-07T13:19:51.511Z 2023-06-07T13:19:51.956Z INFO chromedriver: Initiate Chromedriver Launcher (v8.1.1) DevTools listening on ws://127.0.0.1:56353/devtools/browser/f59221f4-e0d5-4dbb-9525-d16908715db0 "spec" Reporter:[chrome 114.0.5735.91 windows #0-0] Running: chrome (v114.0.5735.91) on windows Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:07 2023-06-07T13:19:59.055Z INFO @wdio/local-runner: Shutting down spawned worker |
Beta Was this translation helpful? Give feedback.
All reactions
-
You can't import |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @christian-bromann , Thanks so much for your help !! It is working |
Beta Was this translation helpful? Give feedback.
-
Here is my code.
const Key = require('webdriverio');
describe('firstName Search', () => {
it('firstName Test', async () => {
await browser.maximizeWindow()
await browser.url('https://www.google.com/')
// browser.setValue('input', ['Tab'])
await browser.Key(Tab)
})
I'm getting below error ,Please help me
[0-0] ReferenceError in "firstName Search.firstName Test"
ReferenceError: Tab is not defined
at Context. (C:\Users\aravindbabu.kadiyala\Downloads\Springboard\test\specs\Debug.js:7:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[0-0] 2023-06-07T12:19:01.615Z INFO webdriver: COMMAND deleteSession()
[0-0] 2023-06-07T12:19:01.615Z INFO webdriver: [DELETE] http://localhost:9515/session/1e168b789cb0ff0d3e9b7441c752a1fa
[0-0] 2023-06-07T12:19:01.960Z INFO webdriver: RESULT null
[0-0] FAILED in chrome - file:///C:/Users/aravindbabu.kadiyala/Downloads/Springboard/test/specs/Debug.js
2023-06-07T12:19:02.283Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2023-06-07T12:19:02.284Z INFO @wdio/cli:launcher: Run onComplete hook
"spec" Reporter:
[chrome 114.0.5735.91 windows #0-0] Running: chrome (v114.0.5735.91) on windows
[chrome 114.0.5735.91 windows #0-0] Session ID: 1e168b789cb0ff0d3e9b7441c752a1fa
[chrome 114.0.5735.91 windows #0-0]
[chrome 114.0.5735.91 windows #0-0] » \test\specs\Debug.js
[chrome 114.0.5735.91 windows #0-0] firstName Search
[chrome 114.0.5735.91 windows #0-0] ✖ firstName Test
[chrome 114.0.5735.91 windows #0-0]
[chrome 114.0.5735.91 windows #0-0] 1 failing (1.7s)
[chrome 114.0.5735.91 windows #0-0]
[chrome 114.0.5735.91 windows #0-0] 1) firstName Search firstName Test
[chrome 114.0.5735.91 windows #0-0] Tab is not defined
[chrome 114.0.5735.91 windows #0-0] ReferenceError: Tab is not defined
Beta Was this translation helpful? Give feedback.
All reactions