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

Testcase hangs after expecting in two different windows. Testcafe V1.12 Chrome 89. #6037

Closed
PatrickVibild opened this issue Mar 10, 2021 · 5 comments · Fixed by #6800
Closed
Assignees
Labels
AREA: server FREQUENCY: level 1 SYSTEM: video recording An issue related to the video recording functionality. SYSTEM: window management TYPE: bug The described behavior is considered as wrong (bug).

Comments

@PatrickVibild
Copy link

What is your Test Scenario?

Running a test that requires interaction with two windows and expecting in two windows.

What is the Current behavior?

The tests hangs if expecting in both windows with Chrome.

What is the Expected behavior?

Finish the test result.

What is your web application and your TestCafe test code?

Running testcafe on website that requires access. However I replicated this issue on a public website.

The issue comes when expecting in two different windows. If the new created window did not had any expect the tests result would finish. However if both windows are expected the tests hangs when expecting in the main or parent window.

fixture('Two windows - expect bug')
    .page('https://www.dr.dk/');
test
('Open website page in 2 windows and expect', async t => {
    await t
        .click(Selector('button[name="submitAll"]'))
        .click(Selector('button[class="dre-search-input__button dre-search-input--expand__button"]'))
        .typeText(Selector('input[name="query"]'), 'foo')
        .openWindow('https://www.dr.dk/').resizeWindow(1200,700)
        .typeText(Selector('input[name="query"]'), 'foo')
        .pressKey('enter')
        .expect(Selector('a[href="https://www.dr.dk/"]').exists).ok({ timeout: 5000 })
        .closeWindow()
        .pressKey('enter')
        .expect(Selector('a[href="https://www.dr.dk/"]').exists).ok({ timeout: 5000 })
        .expect(Selector('span').withText('Yuk Foo | Wolf Alice').exists).ok({ timeout: 5000 });
}).only;
 

Your Environment details:

  • testcafe version: 1.12.0
  • node.js version: 14.15.4
  • command-line arguments: testcafe chrome src/tests -c 1
  • browser name and version: Chrome v89
  • platform and version: Windows 10
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 10, 2021
@AndreyBelym
Copy link
Contributor

Thank you for your report. Unfortunately, I cannot reproduce the issue with the version from the Git repo. Could you please install
testcafe-1.12.1-alpha.1.tar.gz with the following command:

npm i https://github.com/DevExpress/testcafe/files/6130384/testcafe-1.12.1-alpha.1.tar.gz

or by using the following line in your package.json in the dependencies or devDependencies sections:

"testcafe": "https://github.com/DevExpress/testcafe/files/6130384/testcafe-1.12.1-alpha.1.tar.gz"

and check if the problem can be reproduced with this version and your machine?

@AndreyBelym AndreyBelym added STATE: Need clarification An issue lacks information for further research. and removed STATE: Need response An issue that requires a response or attention from the team. labels Mar 12, 2021
@PatrickVibild
Copy link
Author

Hi,

I tried with alpha 1.12.1 version. Also fails.

However, I found that the issue might be when running this tests with my .testcaferc.json file.

When I remove my testcafe config file the test doesnt hung anymore. Can you please try if running the previous tests with the next .testcaferc.json triggers the issue?

{
  "browsers": [
    "chromium"
  ],
  "src": [
    "src/tests"
  ],
  "screenshots": {
    "path": "report/media",

    "takeOnFails": true,
    "pathPattern": "${DATE}/${TEST}/${FILE_INDEX}.png"
  },
  "videoPath": "report/media",
  "videoOptions": {
    "singleFile": false,
    "failedOnly": true,
    "pathPattern": "${DATE}/${TEST}/${FILE_INDEX}.mp4"
  },
  "skipJsErrors": true,
  "skipUncaughtErrors": true
}

@no-response no-response bot removed the STATE: Need clarification An issue lacks information for further research. label Mar 12, 2021
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 12, 2021
@AndreyBelym AndreyBelym added AREA: server FREQUENCY: level 1 SYSTEM: video recording An issue related to the video recording functionality. SYSTEM: window management TYPE: bug The described behavior is considered as wrong (bug). labels Mar 16, 2021
@AndreyBelym
Copy link
Contributor

Thank you for sharing your config file. I was able to reproduce the issue. It seems that it is caused by video recording options: the test passes when I remove them from the config file.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Mar 16, 2021
@achernak
Copy link

achernak commented Jun 4, 2021

@AndreyBelym Any updates regarding the issue? Is there any chance that it will be picked up and fixed soon?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jun 4, 2021
@AlexSkorkin AlexSkorkin added the STATE: No updates No updates are available at this point. label Jun 7, 2021
@github-actions
Copy link

github-actions bot commented Jun 7, 2021

No updates yet. Once we get any results, we will post them in this thread.

AndreyBelym pushed a commit to AlexKamaev/testcafe that referenced this issue Feb 28, 2022
AndreyBelym pushed a commit to AlexKamaev/testcafe that referenced this issue Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: server FREQUENCY: level 1 SYSTEM: video recording An issue related to the video recording functionality. SYSTEM: window management TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
5 participants