Open NikhilHedau opened 1 year ago
@NikhilHedau - In large part, this stuff isn't supported in 4.x because there should be no differences between local and remote playback. These commands are some of the worst parts of 3.x. Maybe we can bridge this stuff in some way, but it definitely isn't something we want to encourage anymore.
Hi @toddtarsi , Sorry for my delayed response .Are there any alternatives of the above command that are available in newer selenium version?
@NikhilHedau - Yep, accept, assert, dismiss confirmation. Accept, assert alert. Nothing should involve next steps anymore. Just the thing comes up and we do it. No more wacky and wild alert / confirm polyfills.
If that resolves your issues, feel free to close. Otherwise, let me know what you're dealing with and I'll try to help.
Hi @toddtarsi , Thanks for the update. For now , I will close this as working on something else. Will verify the alternative commands that you have provided once I get some time.
Thanks for your help :-)
Hello,
I check this issue and I try to know if an "alert" exists on the page.
If I read the previous answer, I should write the Side file like this:
command | target | value |
---|---|---|
assertConfirm | confirmExist | |
if | confirmExist | |
acceptConfirm | ||
end |
I thank you in advance
🐛 Bug Report
The following commands are not working in selenium side runner version 4.0.0-alpha.36 with or without proxy, webdriverChooseCancelOnVisibleConfirmation, webdriverChooseOkOnVisibleConfirmation, chooseOkOnNextConfirmation, chooseCancelOnNextConfirmation.
Attaching below command line output for your reference.
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/webDriverChooseOkayOnVisibleConfirmation.side' ], proxyOptions: { http: 'proxy', https: 'proxy', bypass: [ 'noproxy' ] }, proxyType: 'manual', runId: '21a8b87aad6c41a352092c4e7e2fbec2', 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: '92B7E188-0502-417A-BD0B-2216E8EF7373', 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: '/Users/userName', 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/webDriverChooseOkayOnVisibleConfirmation.side"],"proxyOptions":{"http":"proxy","https":"proxy","bypass":["noproxy"]},"proxyType":"manual","runId":"21a8b87aad6c41a352092c4e7e2fbec2","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 click|id=confirm debug: passed click|id=confirm debug: executing pause|5000 debug: passed pause|5000 debug: executing webdriverChooseOkOnVisibleConfirmation debug: errored webdriverChooseOkOnVisibleConfirmation 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 (12.483 s) Running project Test Running suite Default Suite ✕ Running test Untitled (12298 ms)
● Running project Test › Running suite Default Suite › Running test Untitled
● Running project Test › Running suite Default Suite › Running test Untitled
Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 12.499 s, estimated 13 s Ran all test suites within paths "/Users/userName/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js".
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 click|id=confirm debug: passed click|id=confirm debug: executing pause|5000 debug: passed pause|5000 debug: executing webdriverChooseCancelOnVisibleConfirmation debug: errored webdriverChooseCancelOnVisibleConfirmation 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 (12.406 s) Running project Test Running suite Default Suite ✕ Running test Untitled (12229 ms)
● Running project Test › Running suite Default Suite › Running test Untitled
● Running project Test › Running suite Default Suite › Running test Untitled
Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 12.422 s, estimated 13 s Ran all test suites within paths "/Users/userName/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js".
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 pause|3000 debug: passed pause|3000 debug: executing chooseOkOnNextConfirmation debug: errored chooseOkOnNextConfirmation 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 (9.767 s) Running project Test Running suite Default Suite ✕ Running test Untitled (9577 ms)
● Running project Test › Running suite Default Suite › Running test Untitled
● Running project Test › Running suite Default Suite › Running test Untitled
Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 9.784 s, estimated 13 s Ran all test suites within paths "/Users/userName/.npm-global/lib/node_modules/selenium-side-runner/dist/main.test.js".
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 pause|3000 debug: passed pause|3000 debug: executing chooseCancelOnNextConfirmation debug: errored chooseCancelOnNextConfirmation 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 (9.624 s) Running project Test Running suite Default Suite ✕ Running test Untitled (9437 ms)
● Running project Test › Running suite Default Suite › Running test Untitled
● Running project Test › Running suite Default Suite › Running test Untitled
Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 9.64 s, estimated 10 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
Test should pass
Project file reproducing this issue (highly encouraged)
PFB attached side files.
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 Side Files.zip