Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The library throws error when executing tests on Internet Explorer #19

Closed
suchitrak opened this issue Jun 14, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@suchitrak
Copy link

suchitrak commented Jun 14, 2021

When following line is executed on IE11, Below error is displayed. The below lines works perfectly on Chrome and Chromium Edge though. I am using webdriverio version V6.

When('I {word} the/a(n) {word} named/called/labelled/labeled {string}', (action, ariaRole, text) => {
    browser.findByRole(ariaRole, { name: text })[action]();
});

[0-1] 2021-06-14T18:23:16.301Z ERROR webdriver: Request failed with status 500 due to javascript error: Error executing JavaScript
@olivierwilkinson
Copy link
Collaborator

olivierwilkinson commented Jun 14, 2021

We currently use a target of es2019 which is too recent to support IE 11. When I get some more time I'll look into getting the target to ES5 which does support IE 11 but it's not a simple as just changing it in the tsconfig unfortunately.

I'll look into it after I've got Firefox working properly, but if you'd like to raise a PR it would be more than welcome!

@nickmccurdy nickmccurdy added the bug Something isn't working label Jul 11, 2021
@dmccr
Copy link

dmccr commented Aug 1, 2021

I'm seeing the same error on firefox (using latest version on browserstack)
WARN webdriver: Request failed with status 500 due to TypeError: window.TestingLibraryDom is undefined

@olivierwilkinson
Copy link
Collaborator

I'm seeing the same error on firefox (using latest version on browserstack)
WARN webdriver: Request failed with status 500 due to TypeError: window.TestingLibraryDom is undefined

Hi there @dmccr 👋 .

Oh bummer, I thought I had fixed that issue in v3.0.2! Would you mind confirming that you are on that version? Then I'll reopen this issue.

I made sure to start running our tests against the latest version of Firefox when I originally resolved that issue so if possible would you be able to let me know what device and version of Firefox Browserstack is using when it fails? The problem might be device / environment specific.

Thanks for letting us know btw 😄

@dmccr
Copy link

dmccr commented Aug 2, 2021

@olivierwilkinson Thanks for the quick response.
Indeed I was using older version 2.1.1, and its working fine on 3.0.2. Should have checked that :(
I'm a big fan of testing-library approach. Keep up the good work!

@nickmccurdy
Copy link
Member

This seems to have been fixed, and Internet Explorer's support is ending anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants