-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Is your feature request related to a problem?
This issue is a follow up to comment #11712 (comment)
Some older browsers configured in capabilities throw errors when running scripts from webdriverio/src/scripts, is this something we could solve or prevent using automation?
I've added some suggestions below
Script errors in older browsers
For example, I've fixed some element method issues in older Firefox and IE11:
- [🐛 Bug]:
TypeError: invalid 'instanceof' operand window.ShadowRootin Firefox 55 + IE11 #11705 - [🐛 Bug]: Arrow functions and
.contains()crash IE11 viaisElementDisplayed()#11711
I'm getting there, but some are still failing:
See GitHub Actions logs and Sauce Labs output for more info
[internet explorer 11 windows #2-0] 25 passing (2m 3.7s)
[internet explorer 11 windows #2-0] 6 failingDescribe the solution you'd like.
Since the scripts in webdriverio/src/scripts are TypeScript, could we target an older ECMAScript version?
They're currently using TypeScript "target": "es2022"
Describe alternatives you've considered.
- Using TypeScript
"target": "es5"or lower for downleveling (and warnings) - Using ESLint with
eslint-plugin-es-xto check syntax againstecmaVersion - Using Babel presets to transform scripts without heavy polyfills
- Using Internet Explorer 11 as a "token old browser" in E2E tests
Additional context
What tests could be added to prevent unsupported syntax from being added again in future?
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable