testcafe icon indicating copy to clipboard operation
testcafe copied to clipboard

Browser freezes and goes into not responding state for IE 11

Open saibs opened this issue 6 years ago • 8 comments

What is your Test Scenario?

I have simple login form which is a aws amplify screen.

What is the Current behavior?

When the tests run for login, the browser actually freezes for chrome, firefox and IE11 but it recovers for chrome and firefox after sometime but IE 11 never recovers and goes into not responding state.

What is the Expected behavior?

Login should work normally without freezing browser.

What is your web application and your TestCafe test code?

Link to the app

You can even give incorrect credentials. Your website URL (or attach your complete example):
Your complete test code (or attach your test files):
 import { Role, Selector } from 'testcafe'

import { config } from './config'

export const admin = Role(`${config.baseUrl}`, async (t) => {
  await t
    .typeText(
      '[name="username"][data-test="username-input"]',
      config.appAdminUserName(),
    )
    .pressKey('tab')
    .typeText('[type="password"]', config.appAdminPassword())
    .pressKey('enter')
    .click('button[type=submit]')
    .expect(Selector('[data-testid="signout"]').exists)
    .ok()
})
[screen capture](https://user-images.githubusercontent.com/1705639/85275519-bc870400-b480-11ea-8812-dd9d72e87ec4.gif)

You can see in the gif attached, the first part of the video where I try to login manually which works fine, when I switch tab and running a remote test and performing same scenario the browser freezes for firefox but recovers after somepoint but never recovers for IE 11. Added breakpoints to show where the delay is in executing javascript.

Your complete configuration file (if any):
{
  "src": ["./src/specs"],
  "tsConfigPath": "./tsconfig.json"
}

Your complete test report:

Screenshots:

Steps to Reproduce:

  1. Go to my website ...
  2. Execute this command...
  3. See the error...

Your Environment details:

  • testcafe version: 1.86

  • node.js version: 12

  • command-line arguments:

  • browser name and version:

  • platform and version:

  • other:

saibs avatar Jun 22 '20 10:06 saibs

Sent details of the application over support email.

saibs avatar Jun 22 '20 10:06 saibs

@saibs

Hello,

I confirm there are some differences in native/TestCafe behavior when the submit button is clicked. We need some time to examine it.

For the team.

  1. Click the submit button without login/password: Chrome 83 / Windows 10 - failed IE 11 / Windows 10 - passed Firefox 77 / Windows 10 - passed
import { Role, Selector } from 'testcafe';

const pageURL = 'PAGE_URL';

const admin = Role(pageURL, async t => {
    await t
        .click(Selector('button[type=submit]'))
        .expect(Selector('span').withText('Benutzername darf nicht leer sein').exists).ok('', { timeout: 25000 });
});

fixture `Fixture`;

test
    .page(pageURL)
    ('test', async t => {
    await t
        .useRole(admin);
});
  1. Click the submit button with incorrect login/password: IE 11 / Windows 10 - no result Chrome 83 / Windows 10 - cannot type password Firefox 77 / Windows 10 - passed
import { Role, Selector } from 'testcafe';

const pageURL = 'PAGE_URL';

const admin = Role(pageURL, async t => {
    await t
        .typeText(
            Selector('[name="username"][data-test="username-input"]'),
            'username',
        )
        .typeText(Selector('[type="password"]'), 'password')
        // .wait(3000)
        // .pressKey('enter')
        .click(Selector('button[type=submit]'));

    await t
        .expect(Selector('span').withText('Benutzer existiert nicht').exists).ok('', { timeout: 25000 });
});

fixture `Fixture`;

test
    .page(pageURL)
    ('test', async t => {
    await t
        .useRole(admin);
});

Farfurix avatar Jun 23 '20 13:06 Farfurix

@Farfurix Thank you for your response. The page has css zoom settings(sorry for not mentioning earlier), hence testcafe fails in type in password known issue, if opened with default resolution. Hence, I generally test with remote testing or resize window before running the tests to 1600x1200

import { Role, Selector } from 'testcafe'

const pageURL = 'PAGE_URL';

export const admin = Role(pageURL, async (t) => {
  await t
    .resizeWindow(1600, 1200)
    .typeText('[name="username"][data-test="username-input"]', 'username')
    .pressKey('tab')
    .typeText('[type="password"]', 'password')
    .pressKey('enter')
    .expect(Selector('[data-testid="signout"]').exists)
    .ok()
})

saibs avatar Jun 23 '20 14:06 saibs

@saibs

Thank you for the additional information. We'll take it into account.

Farfurix avatar Jun 25 '20 07:06 Farfurix

Further investigation hope it helps, browser freezes in testcafe when this particular computation is run AuthenticationHelper AWS amplify. I believe it's a longer computation to encrypt password, and ie11 never recovers moving into non-responding mode.

saibs avatar Jun 29 '20 09:06 saibs

Hello @saibs ,

Thank you for the update. We will take this info into account.

aleks-pro avatar Jun 30 '20 12:06 aleks-pro

This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.

github-actions[bot] avatar Jun 08 '22 02:06 github-actions[bot]

We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.

github-actions[bot] avatar Jun 18 '22 02:06 github-actions[bot]