SeleniumHQ / selenium-ide

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

Re: Playback window: Steps not recording #1727

Closed Samyak109 closed 8 months ago

Samyak109 commented 8 months ago

https://github.com/SeleniumHQ/selenium-ide/issues/1722

🐛 Bug Report While I am starting recording from the Project Editor, Playback windows open but the steps that we perform are not recorded and shown as commands on project editor window.

To Reproduce Steps to reproduce the behavior:

Click on new project from the splash window. Create a new test and then click on start record button You will notice when we are recording the steps, those are not getting captured on the project editor Expected behavior All the actions should get recorded and when we close the playback window, close command should also get recorded

Error: 9:26:34 AM [debug] [ 'Playing state changed prep for test New Test' ] 9:26:34 AM [info] [ 'Building driver for chrome' ] 9:26:34 AM [info] [ 'Driver has been built for chrome' ] 9:26:34 AM [debug] [ 'Playing state changed playing for test New Test' ] 9:26:34 AM [debug] [ 'Playing state changed finished for test New Test' ] 9:26:35 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:35 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:35 AM [info] [ TypeError: Cannot read properties of undefined (reading 'opensWindow') at c.getWinHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:143:16) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:52:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:72:13) ] 9:26:35 AM [info] [ '- -' ] 9:26:40 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:40 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:40 AM [info] [ TypeError: Cannot read properties of undefined (reading 'opensWindow') at c.getWinHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:143:16) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:52:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:72:13) ] 9:26:40 AM [info] [ '- -' ] 9:26:40 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:40 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:40 AM [info] [ TypeError: Cannot read properties of undefined (reading 'opensWindow') at c.getWinHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:143:16) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:52:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:72:13) ] 9:26:40 AM [info] [ '- -' ] 9:26:44 AM [info] [ { id: '0f89e484-39d5-4437-bbd7-a6a01d25bb9f', name: 'New Test', commands: [ [Object] ] }, 1 ] 9:26:44 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:44 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:44 AM [info] [ TypeError: Cannot read properties of undefined (reading 'command') at getLastActiveWindowHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:53:14) at c.recordNewCommand (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:76:7) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:54:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:65:13) ] 9:26:44 AM [info] [ '- -' ] 9:26:49 AM [info] [ { id: '0f89e484-39d5-4437-bbd7-a6a01d25bb9f', name: 'New Test', commands: [ [Object] ] }, 1 ] 9:26:49 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:49 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:49 AM [info] [ TypeError: Cannot read properties of undefined (reading 'command') at getLastActiveWindowHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:53:14) at c.recordNewCommand (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:76:7) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:54:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:65:13) ] 9:26:49 AM [info] [ '- -' ] 9:26:49 AM [info] [ { id: '0f89e484-39d5-4437-bbd7-a6a01d25bb9f', name: 'New Test', commands: [ [Object] ] }, 1 ] 9:26:49 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:49 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:49 AM [info] [ TypeError: Cannot read properties of undefined (reading 'command') at getLastActiveWindowHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:53:14) at c.recordNewCommand (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:76:7) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:54:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:65:13) ] 9:26:49 AM [info] [ '- -' ] 9:26:50 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:50 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:50 AM [info] [ TypeError: Cannot read properties of undefined (reading 'opensWindow') at c.getWinHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:143:16) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:52:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:72:13) ] 9:26:50 AM [info] [ '- -' ] 9:26:52 AM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 9:26:52 AM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 9:26:52 AM [info] [ TypeError: Cannot read properties of undefined (reading 'opensWindow') at c.getWinHandleId (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\session\controllers\Recorder\index.ts:143:16) at process.result (node:internal/process/task_queues:95:5) at result (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:52:13) at IpcMainImpl.<anonymous> (AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\RawHandler.ts:72:13) ] 9:26:52 AM [info] [ '- -' ]

Environment OS: Windows 10 Selenium IDE Version: Selenium.IDE.Setup.4.0.0-alpha.51 Browser: Browser Version: Chrome Version 117.0.5938.150 (Official Build) (64-bit)

toddtarsi commented 8 months ago

@Samyak109 - I see this lists v.49 here, can you try on the latest binary v.51 or is that a typo?

Samyak109 commented 8 months ago

@toddtarsi Sorry My bad, It was a typo. I installed latest v.51 then tried.

toddtarsi commented 8 months ago

@Samyak109 - Okay, I am pushing out v.52 now. It basically just has a minor check here for an empty recorder list. Thanks for reporting, please let me know if this resolves your issue. I'll leave this open.

Samyak109 commented 8 months ago

@toddtarsi thanks for having a look but still I am getting an error. But this time it is different. Behavior is same, Not able to record. Error: 1:41:56 PM [info] [ '[PROCESS] Unhandled Promise Rejection' ] 1:41:56 PM [info] [ '- - - - - - - - - - - - - - - - - - -' ] 1:41:56 PM [info] [ TypeError: Cannot read properties of undefined (reading 'slice') at updater (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\side-api\src\commands\tests\addSteps.ts:34:49) at baseUpdate (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\_baseUpdate.js:15:32) at apply (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\update.js:32:36) at apply (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\fp\_baseConvert.js:118:10) at T (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\_createHybrid.js:87:15) at updater (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\side-api\src\commands\tests\addSteps.ts:31:14) at baseUpdate (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\_baseUpdate.js:15:32) at apply (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\update.js:32:36) at apply (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\fp\_baseConvert.js:118:10) at T (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\_createHybrid.js:87:15) at t.mutator (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\side-api\src\commands\tests\addSteps.ts:27:34) at mutator (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\side-api\src\commands\recorder\start.ts:17:10) at o (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:56:36) at process.result (node:internal/process/task_queues:95:5) at IpcMainImpl.<anonymous> (\AppData\Local\Programs\@seleniumhqselenium-ide\resources\app.asar\build\webpack:\src\main\api\classes\Handler.ts:65:13) ] 1:41:56 PM [info] [ '- -' ]

toddtarsi commented 8 months ago

@Samyak109 - Can you upload the step file here or message it to me at tarsitodd@gmail.com

Samyak109 commented 8 months ago

@toddtarsi I am not able to get what a step file is. Can you provide more detailing around that.

toddtarsi commented 8 months ago

@Samyak109 - Ugh, I mean side file, sorry the extension was not clicking in my head at first

toddtarsi commented 8 months ago

@Samyak109 - Later tonight, I'll work on adding a debug dump command that produces a file to send to me for analysis. Clearly there's more going on here than I can figure out iterating stack traces with you, so I need to dump some internals there and look over them to understand.

toddtarsi commented 8 months ago

@Samyak109 - I really appreciate your patience and help looking into this

toddtarsi commented 8 months ago

@Samyak109 - Okay, for this issue, I have released a new feature. There is a new application menu column Help, which has a command called Dump Session To File. If you run that command, you'll get a file with the active project, editor state, and all logs dumped. Can you either upload it here or (if it has stuff you don't want to be in public domain) email it to me at tarsitodd@gmail.com, thanks!

Samyak109 commented 8 months ago

@toddtarsi Thanks for the effort for adding the Dump Session to file function. Apparently, .54 version is working and steps are getting recorded. I will try out few more times and then If I face something then will dump the file here

toddtarsi commented 8 months ago

Closing this for now

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.