SeleniumHQ / selenium-ide

Open Source record and playback test automation for the web.
https://selenium.dev/selenium-ide/
Apache License 2.0
2.72k stars 739 forks source link

setSpeed command not working in selenium side runner version 4.0.8 #1828

Open NikhilHedau opened 1 month ago

NikhilHedau commented 1 month ago

🐛 Bug Report

setSpeed command is not working in selenium side runner version 4.8.0. Same is working in selenium side runner version 3.17.0 Attached below is the debug log

info: Running test setSpeed debug: Playing state changed prep for test setSpeed debug: Playing state changed playing for test setSpeed debug: executing setSpeed|10 debug: errored setSpeed|10 debug: Playing state changed errored for test setSpeed info: Finished test setSpeed Failure debug: Last command: {"command":"setSpeed","comment":"","id":"14e7ce9d-1e3d-42c3-8625-cfeb185226b8","target":"10","targets":[],"value":""} FAIL ../.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js Running project Test Running suite Default Suite ✕ Running test setSpeed (936 ms)

● Running project Test › Running suite Default Suite › Running test setSpeed

`set speed` is not supported in this run mode during setSpeed:10:

  at WebDriverExecutor.doSetSpeed (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:1426:11)
  at executor (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:140:53)
  at CommandNode._executeCommand (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:152:24)
  at CommandNode.execute (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:112:31)
  at Playback._executeCommand (node_modules/@seleniumhq/side-runtime/src/playback.ts:560:22)
  at Playback._executionLoop (node_modules/@seleniumhq/side-runtime/src/playback.ts:438:18)
  at node_modules/@seleniumhq/side-runtime/src/playback.ts:346:9

Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 1.158 s, estimated 2 s Ran all test suites within paths "/Users/nhedau/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js". Jest did not exit one second after the test run has completed.

'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with --detectOpenHandles to troubleshoot this issue.

To Reproduce

selenium-side-runner setSpeed.side -c "browserName=chrome" --debug

Expected behavior

Test should pass

Project file reproducing this issue (highly encouraged)

{ "id": "9f62ff1e-d828-4e5c-8ca1-a2352dcb2bed", "version": "2.0", "name": "Test", "url": "https://martinfowler.com", "tests": [ { "id": "799ffc2c-92e2-4b80-a4fe-fbb16ada97c9", "name": "setSpeed", "commands": [ { "id": "14e7ce9d-1e3d-42c3-8625-cfeb185226b8", "comment": "", "command": "setSpeed", "target": "10", "targets": [], "value": "" }, { "command": "open", "target": "/architecture/", "value": "", "id": "b8eb10f0-27c8-440a-bb7f-f68a8da5273c" }, { "command": "close", "target": "", "value": "", "id": "3941818f-93ea-40a4-ac0f-da8f4a9b4eb2" } ] } ], "suites": [ { "id": "35405411-d767-4218-a156-03ffea660a57", "name": "Default Suite", "persistSession": false, "parallel": false, "timeout": 300, "tests": [ "799ffc2c-92e2-4b80-a4fe-fbb16ada97c9" ] } ], "urls": [ "https://martinfowler.com", "https://martinfowler.com/architecture" ], "plugins": [] }

Environment

OS: macOS Sonoma ver 14.3.1, Chip: Apple M1 Pro Selenium IDE Version: Electron version 28.2.0 Selenium SIDE Runner Version: 4.0.8 Please note that selenium-side-runner supports Node.js 16+ --> Node version: 20.11.1 Only required if using selenium-side-runner --> Browser: GoogleChrome Browser Version: 124.0.6367.119 (Official Build) (arm64) ChromeDriver Version : 123.0.6312.86

chrisisth commented 1 month ago

Version is 4.0.8 not 4.8.0

NikhilHedau commented 1 month ago

Thanks @chrisisth for pointing this out.

NikhilHedau commented 1 month ago

Hi @toddtarsi , Did you get a chance to look into this?

NikhilHedau commented 1 day ago

Hi @toddtarsi , Were you able to check this?

toddtarsi commented 20 hours ago

I didn't look into this one. setSpeed just adds a timeout in between every step? I don't think this came into v4 since it's generally less preferred to using polling as part of the core click/type/interact logic