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

Exception occurs only through TestCafe, executing manually or through other autmation tool looks good #7686

Closed
aprabh001c opened this issue May 8, 2023 · 6 comments · Fixed by DevExpress/testcafe-hammerhead#2890
Assignees
Labels
SYSTEM: native automation TYPE: bug The described behavior is considered as wrong (bug).

Comments

@aprabh001c
Copy link

aprabh001c commented May 8, 2023

What is your Scenario?

  1. Launch https://www.xfinity.com/learn/offers
  2. Search with a valid address
  3. Select an offer
    Expected: - No exception should be given
    Actual:- Something went wrong error shown, but manually or running through other automation tools it looks fine

Script:

import {t, Selector} from 'testcafe'

fixture `UnHandledException`

test(`UnhandledExceptionTC`, async tn=>{
const _addressField = Selector('#Address_SingleStreetAddress,input[name="localizationAddressField"]');
const _search = Selector(".localization-container button[type='submit']");

await t.navigateTo("https://www.xfinity.com/learn/offers");
await t.wait(10000);
await t.typeText(_addressField,"1800 ARCH ST, APT C1230, PHILADELPHIA, PA 19103",{paste:true})
await t.debug()
await t.click(Selector('main span').withText('1800 ARCH ST, APT C1230, PHILADELPHIA, PA 19103'))
await t.click(Selector('[class="localization-container"] button[type="submit"]'))
await t.wait(2000)
await t.click(Selector('footer button').withText('View Deals'))
await t.click(Selector('[alt="add-icon"]'))
await t.click(Selector('[name="INTERNET"]~label'))
})

Note: - Tried to record video using --video command but it ended up with blank white screen
Downloaded FFMEG and set as env variable as well, but it didnt help
image
+
image

What is the Current behavior?

image

What is the Expected behavior?

No exception should be given

What is your public website URL? (or attach your complete example)

https://www.xfinity.com/learn/offers

What is your TestCafe test code?

import {t, Selector} from 'testcafe'

fixture `UnHandledException`

test(`UnhandledExceptionTC`, async tn=>{
const _addressField = Selector('#Address_SingleStreetAddress,input[name="localizationAddressField"]');
const _search = Selector(".localization-container button[type='submit']");

await t.navigateTo("https://www.xfinity.com/learn/offers");
await t.wait(10000);
await t.typeText(_addressField,"1800 ARCH ST, APT C1230, PHILADELPHIA, PA 19103",{paste:true})
await t.debug()
await t.click(Selector('main span').withText('1800 ARCH ST, APT C1230, PHILADELPHIA, PA 19103'))
await t.click(Selector('[class="localization-container"] button[type="submit"]'))
await t.wait(2000)
await t.click(Selector('footer button').withText('View Deals'))
await t.click(Selector('[alt="add-icon"]'))
await t.click(Selector('[name="INTERNET"]~label'))
})

Your complete configuration file

npx testcafe chrome testing.js -e --native-automation

Your complete test report

No response

Screenshots

image

Steps to Reproduce

  1. Launch https://www.xfinity.com/learn/offers
  2. Search with a valid address
  3. Select an offer

TestCafe version

2.5.1-rc.1

Node.js version

18.16.0

Command-line arguments

npx testcafe chrome testing.js -e --native-automation

Browser name(s) and version(s)

Chrome 113.0.5672.64

Platform(s) and version(s)

windows 2016 server

Other

No response

@aprabh001c aprabh001c added the TYPE: bug The described behavior is considered as wrong (bug). label May 8, 2023
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 8, 2023
@aleks-pro
Copy link
Collaborator

Hello @aprabh001c ,

Thank you for sharing the test code.
I did not manage to reproduce the issue. Please check the attached screencast:

1.mp4

I tried to reproduce it in the attached project sample. You can run it by using the following commands:

npm ci
npx testcafe chrome ./tests/test.js -e --native-automation

i7686.zip

Please modify the project sample so that we can reproduce the problematic behavior on our side.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 12, 2023
@aprabh001c
Copy link
Author

Hi even in attached video provided as part of your reply, you can see the error message after selecting the block. Below error message doesnt occur if you do same steps manually.
image

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 12, 2023
@aleks-pro
Copy link
Collaborator

Hi @aprabh001c ,

I see the problematic behavior now. Thank you for reporting the issue. We will look into it and update this thread once we have any results. In the meantime, as a workaround, you can disable the Native Automation mode.

@aprabh001c
Copy link
Author

Thanks for looking into it, with Native Automation Off, we always hit below error at end of script (issue raised for same #6861 )

× UnhandledExceptionTC

  1. Uncaught exception:

    Error: Session closed with error code 11
    at new NodeError (node:internal/errors:399:5)
    at Http2Session.onGoawayData (node:internal/http2/core:687:21)
    at Http2Session.callbackTrampoline (node:internal/async_hooks:130:17)

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 16, 2023
@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 17, 2023
@aprabh001c
Copy link
Author

aprabh001c commented May 17, 2023 via email

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 17, 2023
@Aleksey28
Copy link
Collaborator

Hi @aprabh001c,

We will introduce this fix in the upcoming version.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SYSTEM: native automation TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
3 participants