DevExpress / testcafe

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

t.request() not working with proxyless #7523

Closed BenDriesen closed 1 year ago

BenDriesen commented 1 year ago

What is your Scenario?

When sending api requests with the experimental proxyless feature, the test directly fails with a type error:

TypeError: Cannot read properties of null (reading 'proxy')

When proxyless is disabled, this works fine

What is the Current behavior?

Test fails with TypeError: Cannot read properties of null (reading 'proxy')

What is the Expected behavior?

API request is executed similarly as without proxyless

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

https://google.com

What is your TestCafe test code?

test('Request google page', async t => { const res = await t.request('https://google.com') })

Your complete configuration file

{ "experimentalProxyless": true }

Your complete test report

` ✖ Request google page

1) TypeError: Cannot read properties of null (reading 'proxy')`

Steps to Reproduce

  1. Create a request with t.request() and execute the request without the proxyless setting enabled, the test runs fine
  2. Now run the same test with --experimental-proxyless. The test now fails with a type error

TestCafe version

2.3.1

Node.js version

19.0.1

Command-line arguments

testcafe chrome test.js --experimental-proxyless

Browser name(s) and version(s)

Chrome 109.0.0.0

Platform(s) and version(s)

macOS 10.15.7

github-actions[bot] commented 1 year ago

Thank you for submitting this issue. We would love to assist you and diagnose it. However, we need a simple sample that we can easily run on our side in order to replicate the issue and research its cause. Without a sample, we are not able to figure out what's going on and why this issue occurs. Refer to this article to create the best example: How To: Create a Minimal Working Example When You Submit an Issue. We look forward to your response.

BenDriesen commented 1 year ago

@Artem-Babich, I've added an example

miherlosev commented 1 year ago

Hi @BenDriesen,

Support for the t.request action was implemented in https://github.com/DevExpress/testcafe/pull/7504. This feature will be available in the next release.