DevExpress / testcafe

A Node.js tool to automate end-to-end web testing.
https://testcafe.io
MIT License
9.82k stars 671 forks source link

Application landing on blank page / not loading property #8185

Closed aprabh001c closed 4 months ago

aprabh001c commented 4 months ago

What is your Scenario?

Testcafe is getting stuck or landing blank page for many pages. In many cases, testcafe gets stucks and launches a new browser. This behavior varies across the pages. Tried with both native automation ON and OFF, but still application new browser is launched and gets stuck in some other page.

What is the Current behavior?

Application landing on blank page / not loading property

What is the Expected behavior?

App load properly

What is the public URL of the test page? (attach your complete example)

https://www.xfinity.com

What is your TestCafe test code?

import { t, Selector } from "testcafe";

fixtureSampleFixture

test(SampleTC, async tn => {

await t.navigateTo("https://www.xfinity.com/learn/offers");
await t.wait(10000);
await t.click(Selector('button[id="onetrust-accept-btn-handler"], [aria-label="allow cookies"]'))
await t.typeText(Selector('input[name="localizationAddressField"]'), "8299 COMCAST, UNIT 100, BLUEFIELD, WV 24701");
await t.wait(3000)
await t.click(Selector('.suggestions-select__item'))
await t.click(Selector('button[type="submit"]').withText('Build your plan'));
await t.wait(10000);
await t.click(Selector('[data-testid="Internet-lob-drawer-cta"]'))
await t.wait(5000)
await t.click(Selector('button[data-testid="offer-tile-Connect"]'))

})

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

import { t, Selector } from "testcafe";

fixtureSampleFixture

test(SampleTC, async tn => {

await t.navigateTo("https://www.xfinity.com/learn/offers");
await t.wait(10000);
await t.click(Selector('button[id="onetrust-accept-btn-handler"], [aria-label="allow cookies"]'))
await t.typeText(Selector('input[name="localizationAddressField"]'), "8299 COMCAST, UNIT 100, BLUEFIELD, WV 24701");
await t.wait(3000)
await t.click(Selector('.suggestions-select__item'))
await t.click(Selector('button[type="submit"]').withText('Build your plan'));
await t.wait(10000);
await t.click(Selector('[data-testid="Internet-lob-drawer-cta"]'))
await t.wait(5000)
await t.click(Selector('button[data-testid="offer-tile-Connect"]'))

})

TestCafe version

3.6

Node.js version

18.12.0

Command-line arguments

testcafe chrome --concurrency 1 -F SampleFixture

Browser name(s) and version(s)

chrome 124.0.6367.119

Platform(s) and version(s)

Windows 10 Enterprise

Other

No response

aprabh001c commented 4 months ago

Error message in console - The Chrome 124.0.0.0 / Windows Server 2019 browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.

PavelMor25 commented 4 months ago

Hello @aprabh001c ,

I can't reproduce the issue; I'm getting an "access denied" error. Could you please create a minimal working example?

image

aprabh001c commented 4 months ago

Could you please try with https?

On Fri, May 10, 2024 at 6:55 AM Morozov Pavel @.***> wrote:

Hello @aprabh001c https://github.com/aprabh001c ,

I can't reproduce the issue; I'm getting an "access denied" error. Could you please create a minimal working example https://testcafe.io/documentation/402636/faq/general-info?search#how-to-create-a-minimal-working-example-when-you-submit-an-issue ?

image.png (view on web) https://github.com/DevExpress/testcafe/assets/77216072/30cc8f30-255d-4b0b-b4d8-61a6e4d234f9

— Reply to this email directly, view it on GitHub https://github.com/DevExpress/testcafe/issues/8185#issuecomment-2104400381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN24BXJKYYWG6MHEOMVIJCTZBSRRPAVCNFSM6AAAAABHLLLW4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUGQYDAMZYGE . You are receiving this because you were mentioned.Message ID: @.***>

PavelMor25 commented 4 months ago

Hello,

I tried both options, but I still encounter this error and can't investigate the issue. Could you please create a minimal working example? Alternatively, if you have any other method for us to investigate the issue, please let us know.

aprabh001c commented 4 months ago

Hi, It's tough to reproduce with public domains, and the provided website is public. I am not sure why it is not accessible in your network.

On Tue, May 14, 2024 at 2:29 AM Morozov Pavel @.***> wrote:

Hello,

I tried both options, but I still encounter this error and can't investigate the issue. Could you please create a minimal working example https://testcafe.io/documentation/402636/faq/general-info?search#how-to-create-a-minimal-working-example-when-you-submit-an-issue? Alternatively, if you have any other method for us to investigate the issue, please let us know.

— Reply to this email directly, view it on GitHub https://github.com/DevExpress/testcafe/issues/8185#issuecomment-2109384840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN24BXN3H5IKPXXOWCXG2FDZCGVL5AVCNFSM6AAAAABHLLLW4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBZGM4DIOBUGA . You are receiving this because you were mentioned.Message ID: @.***>

PavelMor25 commented 4 months ago

Hello @aprabh001c,

I managed to resolve the "access denied" error. It occurred during the text input step because the server limited access for some time due to a high number of requests. I was able to avoid this issue with a workaround. I used ClientFunction to add the necessary address to the clipboard and then inserted it into the input field with the pressKey method. After this, the test fails at the last step when searching for the element button[data-testid="offer-tile-Connect"].

However, I still couldn't reproduce the initial issue (Windows 10 / Node.js 18.12.0 & 18.20.2 / TestCafe 3.4.0 - 3.6.0). Please specify if you can reproduce this behavior with older versions of TestCafe. Can you reproduce the issue on another machine? On which other sites do you encounter this issue?

github-actions[bot] commented 4 months ago

This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.