DevExpress / testcafe

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

Native Automation seems not working for `.checked`, `ctrl+a` in pressKey(), `stringifyRequestBody: true` in `RequestLogger`, service worker #7667

Closed daenamkim closed 1 year ago

daenamkim commented 1 year ago

What is your Scenario?

In order to use some packages using private in test, I have been testing from --experimental-proxyless to native automation mode for quite amount of time.

What is the Current behavior?

I found some issues that I could not resolve.

This attached file is for a demo what I have tried to confirm on my side:

testcafe-typescript-vue-report.zip

What is the Expected behavior?

All should be working as in normal mode which is no --native-automation

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

Please see testcafe-typescript-vue-report.zip file above

What is your TestCafe test code?

Please see testcafe-typescript-vue-report.zip file above

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

(See README.md)

yarn install
yarn serve

Open another terminal and run:

yarn test:na

TestCafe version

2.5.0

Node.js version

18.14.0

Command-line arguments

(See package.json) npx testcafe chrome --native-automation

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

AlexKamaev commented 1 year ago

Hello. Thank you for sharing your test cases. I got the following results:

.checked of Selector is always false no matter click

I did not manage to reproduce this issue:

ctrl+a does not work for pressKey()

I did not manage to reproduce the issue. It works for me.

stringifyRequestBody: true returns broken string

I could reproduce the issue with version 2.5.0. However, it has been fixed in master but has not been published yet.

service worker is not working at all

I reproduced the issue. Thank you. For some reason, this test fails even without native automation mode on.

daenamkim commented 1 year ago

@AlexKamaev Hi, thanks for clarifying this. Did you try to run the attached file (testcafe-typescript-vue-report.zip) above? Except for .checkbox, all happens in my local env.

Here is my recorded video:

https://user-images.githubusercontent.com/16159767/235088694-d130aeaf-4294-42a8-8b77-16d48afb6807.mp4

For .checkbox, is there any possible case that TestCafe cannot read the value properly? e.g. Web compile setting Since I have tried to make almost same env with our project from scratch but it happens in our project only. FYI, without native automation mode it works well.

daenamkim commented 1 year ago

@AlexKamaev Hi, any update or suggestion for this? :bow:

AlexKamaev commented 1 year ago

@daenamkim We did not have a chance to research your usage scenario in greater detail. The fix with the post request will be published in the next TestCafe release. Regarding your other usage scenarios, we'll check them again once we start working on the issue.

AlexKamaev commented 1 year ago

Hi @daenamkim,

Please try to run your test suite using the latest TestCafe master branch. You can get it from here: https://github.com/AlexKamaev/issues/raw/master/testcafe-2.6.1.tgz.

Let us know your results.

daenamkim commented 1 year ago

Hi @daenamkim,

Please try to run your test suite using the latest TestCafe master branch. You can get it from here: https://github.com/AlexKamaev/issues/raw/master/testcafe-2.6.1.tgz.

Let us know your results.

@AlexKamaev Thanks for the heads up! I have just tested and the result is:

image

ctrl+a does not work but service worker works! That's great improvement! When do you release the new version? I am really looking forward to it.

AlexKamaev commented 1 year ago

@daenamkim

I'm happy to hear that the issue with serviceWorker is solved. As for the ctrl+a issue, the test passes in my case as well. Did you make some modifications in your test or in you app? If you can share your latest example version or prepare another one (perhaps without Vue), we would love to continue the research of the described problem.

daenamkim commented 1 year ago

@daenamkim

I'm happy to hear that the issue with serviceWorker is solved. As for the ctrl+a issue, the test passes in my case as well. Did you make some modifications in your test or in you app? If you can share your latest example version or prepare another one (perhaps without Vue), we would love to continue the research of the described problem.

@AlexKamaev Thanks! I have tested using not only Vue app also the sample code in TestCafe getting started doc. The first video without Native Automation looks good but the second video with it seems not working

https://github.com/DevExpress/testcafe/assets/16159767/6b951184-94e0-48cc-9a60-d5aa702e1dcc

AlexKamaev commented 1 year ago

I'm still not able no reproduce the ctrl+a delete issue. It works for me. Please share your configuration:

Please ensure that you run your tests from local folder and that your TestCafe version is 2.6.1 (only for that my custom build). Please run the npx testcafe -v command and share results with us.

daenamkim commented 1 year ago

@AlexKamaev Thanks for testing again for me. I have tested again I can see the error consistently. I have attached a test code to see the error. It would be glad to know that I did something wrong.

Operating system

macOS 13.3.1 (a) (22E772610a)

Chrome:

Version 113.0.5672.126 (Official Build) (arm64)

Node:

node --version                                                                                                                                                                                                               
v18.14.0

TestCafe

yarn install
npx testcafe -v                                                                                                                                                                                                                
2.6.1

Steps to reproduce

Download testcafe-typescript-vue-report.zip

yarn install
yarn test:na
AlexKamaev commented 1 year ago

@daenamkim We reproduced the issue. It looks like it is specific to MacOS for some reason. Thank you for your cooperation.

aleks-pro commented 1 year ago

Release v3.0.0-rc.1 addresses this.

daenamkim commented 1 year ago

Release v3.0.0-rc.1 addresses this.

It is so beautiful! Thanks!