SeleniumHQ / selenium-ide

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

Issue In Command Line Output with Proxy Options in selenium side runner version 4.0.0-alpha.36 #1576

Open NikhilHedau opened 1 year ago

NikhilHedau commented 1 year ago

🐛 Bug Report

When using proxy options with selenium side runner v 4.0.0-alpha.36 and using incorrect link with waitForElementPresent or waitForElementVisible command, the following line is printed with debug statement, whereas the issue is with waitFor command.

Operation timed out running command open:/:

CMD LINE OUTPUT WITH PROXY SET

Configuration: { baseUrl: '', capabilities: { browserName: 'chrome', proxy: { proxyType: 'manual', httpProxy: 'proxy', sslProxy: 'proxy', noProxy: [Array] } }, debug: true, debugStartup: true, filter: '.', force: undefined, maxWorkers: 8, projects: [ '/Users/userName/Documents/selenium_files/waitForElementVisibleMartinFowler.side' ], proxyOptions: { http: 'proxy', https: 'proxy', bypass: [ 'noproxy' ] }, proxyType: 'manual', runId: '8e290ca0ecbff40c29b12f3519dd5ca4', path: '/Users/userName/.npm-global/lib/node_modules/', server: '', timeout: 15000 } Jest command: /Users/userName/.npm-global/lib/node_modules/selenium-side-runner/node_modules/.bin/jest [ '--config=/Users/userName/.npm-global/lib/node_modules/selenium-side-runner/jest.config.js', '--maxConcurrency=8', '', '--runTestsByPath', '/Users/userName/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js' ] { __CFBundleIdentifier: 'com.apple.Terminal', TMPDIR: '/var/folders/9q/swldxrxn1414t21hdbcrkr3m0000gn/T/', XPC_FLAGS: '0x0', TERM: 'xterm-256color', SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.IiizxJdqdy/Listeners', XPC_SERVICE_NAME: '0', TERM_PROGRAM: 'Apple_Terminal', TERM_PROGRAM_VERSION: '445', TERM_SESSION_ID: '2F2537E5-F922-4CC4-B3F5-DC0E6A0ED3B7', SHELL: '/bin/zsh', HOME: '/Users/userName', LOGNAME: 'userName', USER: 'userName', PATH: '/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', SHLVL: '1', PWD: '/Users/userName', OLDPWD: '/usr/local/bin', HOMEBREW_PREFIX: '/opt/homebrew', HOMEBREW_CELLAR: '/opt/homebrew/Cellar', HOMEBREW_REPOSITORY: '/opt/homebrew', MANPATH: '/opt/homebrew/share/man::', INFOPATH: '/opt/homebrew/share/info:', JAVA_HOME: '/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home', LCCTYPE: 'UTF-8', : '/usr/local/bin/selenium-side-runner-4.0.0-alpha-36', __CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0', SE_CONFIGURATION: '{"baseUrl":"","capabilities":{"browserName":"chrome","proxy":{"proxyType":"manual","httpProxy":"proxy","sslProxy":"proxy","noProxy":["noproxy"]}},"debug":true,"debugStartup":true,"filter":".","maxWorkers":8,"projects":["/Users/userName/Documents/selenium_files/waitForElementVisibleMartinFowler.side"],"proxyOptions":{"http":"proxy","https":"proxy","bypass":["noproxy"]},"proxyType":"manual","runId":"8e290ca0ecbff40c29b12f3519dd5ca4","path":"/Users/userName/.npm-global/lib/node_modules/","server":"","timeout":15000}' } info: Running test Untitled debug: Playing state changed prep for test Untitled info: Building driver for chrome info: Driver has been built for chrome debug: Playing state changed playing for test Untitled debug: executing open|/ debug: passed open|/ debug: executing waitForElementVisible|linkText=Recent Changges|60000 debug: errored waitForElementVisible|linkText=Recent Changges|60000 debug: Playing state changed errored for test Untitled info: Finished test Untitled Failure warn: Completed with failure FAIL .npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js (66.768 s) Running project Test Running suite Default Suite ✕ Running test Untitled (66588 ms)

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

Operation timed out running command open:/:

  at Timeout.<anonymous> (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:151:13)

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

thrown: true

  at node_modules/jest-each/build/bind.js:43:11
      at Array.forEach (<anonymous>)
  at src/main.test.ts:145:7
      at Array.forEach (<anonymous>)

Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 66.784 s Ran all test suites within paths "/Users/userName/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js".

CMD LINE OUTPUT WITHOUT PROXY SET

Configuration: { baseUrl: '', capabilities: { browserName: 'chrome' }, debug: true, debugStartup: true, filter: '.', force: undefined, maxWorkers: 8, projects: [ '/Users/username/Documents/selenium_files/waitForElementVisibleMartinFowler.side' ], proxyOptions: {}, proxyType: undefined, runId: '7f4e3263e869329a6a0f14bb7c793df8', path: '/Users/username/.npm-global/lib/node_modules/', server: '', timeout: 15000 } Jest command: /Users/username/.npm-global/lib/node_modules/selenium-side-runner/node_modules/.bin/jest [ '--config=/Users/username/.npm-global/lib/node_modules/selenium-side-runner/jest.config.js', '--maxConcurrency=8', '', '--runTestsByPath', '/Users/username/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js' ] { __CFBundleIdentifier: 'com.apple.Terminal', TMPDIR: '/var/folders/9q/swldxrxn1414t21hdbcrkr3m0000gn/T/', XPC_FLAGS: '0x0', TERM: 'xterm-256color', SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.IiizxJdqdy/Listeners', XPC_SERVICE_NAME: '0', TERM_PROGRAM: 'Apple_Terminal', TERM_PROGRAM_VERSION: '445', TERM_SESSION_ID: '2F2537E5-F922-4CC4-B3F5-DC0E6A0ED3B7', SHELL: '/bin/zsh', HOME: '/Users/username', LOGNAME: 'username', USER: 'username', PATH: '/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', SHLVL: '1', PWD: '/Users/username', OLDPWD: '/usr/local/bin', HOMEBREW_PREFIX: '/opt/homebrew', HOMEBREW_CELLAR: '/opt/homebrew/Cellar', HOMEBREW_REPOSITORY: '/opt/homebrew', MANPATH: '/opt/homebrew/share/man::', INFOPATH: '/opt/homebrew/share/info:', JAVA_HOME: '/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home', LCCTYPE: 'UTF-8', : '/usr/local/bin/selenium-side-runner-4.0.0-alpha-36', __CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0', SE_CONFIGURATION: '{"baseUrl":"","capabilities":{"browserName":"chrome"},"debug":true,"debugStartup":true,"filter":".","maxWorkers":8,"projects":["/Users/username/Documents/selenium_files/waitForElementVisibleMartinFowler.side"],"proxyOptions":{},"runId":"7f4e3263e869329a6a0f14bb7c793df8","path":"/Users/username/.npm-global/lib/node_modules/","server":"","timeout":15000}' } info: Running test Untitled debug: Playing state changed prep for test Untitled info: Building driver for chrome info: Driver has been built for chrome debug: Playing state changed playing for test Untitled debug: executing open|/ debug: passed open|/ debug: executing waitForElementVisible|linkText=Recent Changges|60000 debug: errored waitForElementVisible|linkText=Recent Changges|60000 debug: Playing state changed errored for test Untitled info: Finished test Untitled Failure warn: Completed with failure FAIL .npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js (65.107 s) Running project Test Running suite Default Suite ✕ Running test Untitled (64935 ms)

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

thrown: true

  at node_modules/jest-each/build/bind.js:43:11
      at Array.forEach (<anonymous>)
  at src/main.test.ts:145:7
      at Array.forEach (<anonymous>)

Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 65.124 s Ran all test suites within paths "/Users/username/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js".

To Reproduce

selenium-side-runner-4.0.0-alpha-36 /Users/username/Documents/selenium_files/waitForElementVisibleMartinFowler.side -c "browserName=chrome" --proxy-type=manual --proxy-options="http=proxy https=proxy bypass=[abc.com]" --debug -D

Expected behavior

Command Line Output should be clear.

Project file reproducing this issue (highly encouraged)

{ "id": "aa7c65aa-fe3e-45ea-adab-267439a50f9f", "version": "2.0", "name": "Test", "url": "https://www.martinfowler.com", "tests": [{ "id": "e9e9562d-49e9-4381-8fac-cf0f02cd5465", "name": "Untitled", "commands": [{ "id": "4f36e10b-84b6-4a3b-b3a5-78bca1265caa", "comment": "", "command": "open", "target": "/", "targets": [], "value": "" }, { "id": "8e6f7909-08d2-4ddf-8c0a-42b93075705c", "comment": "", "command": "waitForElementVisible", "target": "linkText=Recent Changges", "targets": [], "value": "60000" }, { "id": "1ec01d42-e30f-44e9-a970-66cc81b675de", "comment": "", "command": "close", "target": "", "targets": [], "value": "" }] }], "suites": [{ "id": "2dacc401-3e89-423a-8a94-cef0305c4bdf", "name": "Default Suite", "persistSession": false, "parallel": false, "timeout": 300, "tests": ["e9e9562d-49e9-4381-8fac-cf0f02cd5465"] }], "urls": ["https://www.martinfowler.com/"], "plugins": [] }

Environment

OS: macOS Monterey 12.5, Chip : Apple M1 Pro Selenium IDE Version: 3.17.2 Selenium SIDE Runner Version: 4.0.0-alpha.36 Node version: 16.18.0 Browser: Chrome Browser Version: 108.0.5359.124 (Official Build) (arm64) Chrome Driver Version : 108.0.5359.71

toddtarsi commented 1 year ago

@NikhilHedau - Can you provide a reproducing side file? I think you're conflating issue sources here.

NikhilHedau commented 1 year ago

Hi @toddtarsi , I have updated the issue, earlier it was created by mistake