Open ThomasBPG opened 4 years ago
selenium-side-runner uses a completely different approach to automation, it uses Selenium WebDriver, while Selenium IDE uses Selenium Core.
This creates a lot of differences between the two, some of them are functional, for example in the runner you can't click an invisible element.
Another aspect of that is execution time, WebDriver is much faster than the core, and until we move to the electron app, this will not be fixed.
Thanks for the quick feedback. Can you give any hints to how I can update my side-script, so it runs faster with selenium-side-runner ? Appreciate there are differences between the two, but I actually see the complete opposite with selenium-side-runner being much slower than IDE.
It depends on the script, some things are faster in the IDE, while some are slower, it is not a straight up improvement, but rather tradeoffs.
For example assert element displayed is faster in the runner but slower in the IDE, but select window is faster in the IDE and slower in the runner.
Hm...okay, fair. I shall try to do some trial-and-error to see if I can optimize the execution time in the runner. Is it true, btw., that there's no way to output the timing for each step with the runner?
Thanks
Yes, the way the runner is coded it won't allow that, it is something we already took care of in the new runtime.
You could try building what we dubbed for now as side-cli which is the electron cli utility, it has playback capabilities, you can build it off of master, it might give you better cli results.
I've been doing a lot more debugging and the script is now essentially just doing open and assert text. Still have excellent run times in the IDE (approx 1s) and the following from runner:
thomas@Thomass-MacBook-Pro Availability Monitoring % selenium-side-runner -c "browserName=firefox" Administration-Almindelig2.side
info: Running Administration-Almindelig2.side
PASS ./DefaultSuite.test.js (8.243s)
Default Suite
✓ Administration-Almindelig (5044ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 8.72s
Ran all test suites.
thomas@Thomass-MacBook-Pro Availability Monitoring % selenium-side-runner -c "browserName=chrome" Administration-Almindelig2.side
info: Running Administration-Almindelig2.side
PASS ./DefaultSuite.test.js
Default Suite
✓ Administration-Almindelig (2428ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 4.444s, estimated 9s
Ran all test suites.
Guess I can conclude my website contains something the runner really don't like! :-) It's a customer website we are developing on behalf of a client, so I shall refrain from posting the URL here, but it's a React based website with two simple login boxes. Still puzzles me what makes the runner slow so much down....
Anyway, thanks for your feedback. I shall close down the issue.
There is no need to close, it is a legitimate concern and an issue with the IDE, that will not be so easily fixed, once we will unify the runtimes we can safely close this issue.
🐛 Bug Report
The attached script runs in half the time in Firefox Selenium IDE vs. running on the CLI with selenium-side-runner.
To Reproduce
Running it in Firefox Selenium IDE I can run the script in approx. 5s:
If I run it on the commandline, even headless it takes approx. 10s:
Expected behavior
If anything, I would have assumed the test execution to be at least similar, but also faster with the headless approach in selenium-side-runner.
Project file reproducing this issue (highly encouraged)
Environment
OS: Mac OS X 10.15.5 Selenium IDE Version: 3.17.0 Selenium SIDE Runner Version: 3.17.0 Node version: v10.21.0 Browser: Mozilla Firefox Browser Version: 77.0.1