Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javascript error: Unexpected token '{' #1876

Open
e2info-tsujii opened this issue Dec 4, 2024 · 0 comments
Open

javascript error: Unexpected token '{' #1876

e2info-tsujii opened this issue Dec 4, 2024 · 0 comments

Comments

@e2info-tsujii
Copy link

e2info-tsujii commented Dec 4, 2024

🐛 Bug Report

It doesn't work when trying to pass variables to the next test in the test suite.

  1. Create separate tests to "define variables" and "run tests".
  2. Run the two tests consecutively in the test suite.
  3. An error occurs when using variables.
    スクリーンショット 2024-12-04 162100
    スクリーンショット 2024-12-04 162127
    スクリーンショット 2024-12-04 162141

Note

  • I don't think there's a problem with the way the tests are written, because when I run them as one test rather than individually they pass.
    スクリーンショット 2024-12-04 170220

The above usage was possible with the Google Chrome plugin version of Selenium IDE (ver3.17.2). Is it not possible to use it in Selenium ide 4?

To Reproduce

This occurs when you try to pass a variable to the next test in the test suite.

Expected behavior

It is desirable to be able to inherit variables defined in another test to subsequent tests by running a test suite.

Project file reproducing this issue (highly encouraged)

error_sample_01.zip

Error Log

PS C:\Users\username> selenium-ide


DevTools listening on ws://127.0.0.1:8315/devtools/browser/035fad20-d277-4c94-8fef-ddb2e0f7210b
16:57:38.965 > Starting driver electron at C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\node_modules\electron-chromedriver\bin\chromedriver.exe with args --verbose --port=9515
16:57:39.002 > Added Extension:  React Developer Tools
16:57:42.531 > Initializing state
16:57:43.327 > Error occurred in handler for 'driver.listBrowsers': Error: Unsupported platform
    at Object.getBrowserInfo (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\browser-info\src\chrome.ts:107:13)
    at x.handler [as listBrowsers] (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\session\controllers\Driver\index.ts:324:48)
    at doAPI (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\api\classes\Handler.ts:52:28)
    at C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\api\classes\Handler.ts:58:28
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:77758)
    at WebContents.emit (node:events:517:28)
16:57:51.132 > Playing test? 72ea1564-ac8b-485d-ae9c-e789705372f1 _run_test
16:57:51.135 > Instantiating driver builder for  electron
16:57:51.136 > Building driver for electron
16:57:51.566 > Built driver for electron
16:57:51.567 > Built driver for electron
16:57:51.588 > Instantiating driver builder for  electron
16:57:51.589 > Building driver for electron
16:57:51.728 > Built driver for electron
16:57:51.728 > Built driver for electron
16:57:54.848 > Playing state changed prep for test _run_test
16:57:54.854 > Playing state changed playing for test _run_test
16:57:54.873 > Playing state changed finished for test _run_test
16:57:54.875 > Releasing window for playback
16:57:54.878 > Playing test? 8f494ca5-34fc-4904-a1e9-6ae39b88c298 testA
16:57:54.880 > Instantiating driver builder for  electron
16:57:54.881 > Building driver for electron
16:57:54.958 > Built driver for electron
16:57:54.958 > Built driver for electron
16:57:54.985 > Executor is dead. Rebuilding...
16:57:54.997 > Instantiating driver builder for  electron
16:57:54.998 > Building driver for electron
16:57:55.167 > Built driver for electron
16:57:55.168 > Built driver for electron
16:57:55.993 > TypeError: Object has been destroyed
    at WebContents.send (node:electron/js2c/browser_init:2:69142)
    at C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\api\classes\EventListener.ts:113:18
    at new Promise (<anonymous>)
    at fn (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\api\classes\EventListener.ts:105:7)
    at map (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\api\classes\EventListener.ts:39:62)
    at Array.map (<anonymous>)
    at Object.dispatchEvent (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\api\classes\EventListener.ts:39:50)
    at WebFrameMain.<anonymous> (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\session\controllers\Windows\index.ts:590:60)
16:57:56.125 > Playing state changed prep for test testA
16:57:56.131 > Window count: 1
16:57:56.139 > Playing state changed playing for test testA
16:57:56.223 > Playing state changed errored for test testA
16:57:56.224 > Releasing window for playback
16:57:56.226 > v: javascript error: Unexpected token '{'
  (Session info: chrome=120.0.6099.227)
    at Object.throwDecodedError (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\node_modules\.pnpm\[email protected]\node_modules\selenium-webdriver\lib\error.js:521:15)
    at parseHttpResponse (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\node_modules\.pnpm\[email protected]\node_modules\selenium-webdriver\lib\http.js:514:13)
    at Executor.execute (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\node_modules\.pnpm\[email protected]\node_modules\selenium-webdriver\lib\http.js:446:28)
    at process.this (node:internal/process/task_queues:95:5)
    at l.value [as execute] (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\node_modules\.pnpm\[email protected]\node_modules\selenium-webdriver\lib\webdriver.js:741:26)
    at g.result [as evaluateConditional] (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\side-runtime\src\webdriver.ts:1437:7)
    at t.CommandNode.execute (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\side-runtime\src\playback-tree\command-node.ts:112:11)
    at t.default.result [as _executeCommand] (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\side-runtime\src\playback.ts:562:7)
    at t.default._executionLoop (C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\side-runtime\src\playback.ts:438:9)
    at C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\side-runtime\src\playback.ts:345:7
    at C:\Users\username\AppData\Roaming\npm\node_modules\selenium-ide\build\webpack:\src\main\session\controllers\Playback\index.ts:259:7

※Personal information has been changed to "username"

Environment

OS: Windows 11 version 24H2 (OS build 26100.2314)
Selenium IDE Version: version 4.0.1-beta.14
Selenium SIDE Runner Version: unknown
Node version: unknown
Browser: Windows Chrome
Browser Version: version 131.0.6778.86 (Official Build) (64 bit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant