SeleniumHQ / selenium-ide

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

Selenium Side Runner: Parsing Browser Name of -c flag incorrectly #1656

Open laikas123 opened 1 year ago

laikas123 commented 1 year ago

🐛 Bug Report

A clear and concise description of what the bug is.

To Reproduce

Try entering this command:

selenium-side-runner --server http://localhost:4444/ -c "browserName='firefox'" {YOUR SIDE FILE}

You get this as output:

image

Notice that it's building driver for "firefo" instead of "firefox"

If I run this:

selenium-side-runner --server http://localhost:4444/ -c "browserName='firefoxx'" {YOUR SIDE FILE}

It works great:

image

I can reproduce this on two separate machines both ubuntu 22.04

Expected behavior

It should parse the browser name normally.

Project file reproducing this issue (highly encouraged)

Independent of the project file used.

Environment

OS: Ubuntu 22.04 Node version: 20.2.0 Browser: Browser Version:

Selenium Side Runner Version = 4.0.0-alpha.48

toddtarsi commented 1 year ago

Haha oops, great catch! I'll try and take a look later tonight, but thanks for including a workaround for now!

laikas123 commented 1 year ago

No worries! Using Firefoxx with two x's is very foxxy.. May catch on haha

Thanks for the help

toddtarsi commented 1 year ago

@laikas123 - I think its from the single quotes. I use it this way without issue on Github CI as well:

selenium-side-runner -c \"goog:chromeOptions.args=[headless,no-sandbox] browserName=chrome\" -dt 15000 -z ./e2e-failures ./project.side

Still tho, good catch and should fix, thanks for reporting

laikas123 commented 1 year ago

@toddtarsi ah, ok fantastic, thank you so much :+1:

laikas123 commented 1 year ago

@toddtarsi one other thing I found which might be parsing related.

It seems like when running multiple test suites in the output it still says only one test suite passed even if multiple do:

image

Notice that there are two suites ran, but only 1 listed as passed

The command used to run this was:

selenium-side-runner --server http://localhost:4444/ -z . -w 10 -c "browserName=\"firefox\"" twosuites.side

Same environment as this ticket