Closed aprabh001c closed 1 year ago
Thank you for reporting this. I was able to reproduce the issue. For the team: I was able to reproduce it with the testcafe-hammerhead playground.
Hi, I am running into a similar issue, can someone please provide me a solution here. Thank you.
There are no workarounds. Once we get any updates, we will post them in this thread.
Hi @aprabh001c,
TestCafe runs tests using the URL-rewritten proxy.
This approach is good. However, there is a way to improve the stability and speed of test execution - the native browser automation API.
We have a test execution mode uses native browser automation - we call it the Proxyless
mode.
In Proxyless
mode, a few issues are already fixed.
By the way, this issue was also fixed in Proxyless
mode.
Try running your tests in Proxyless
mode and let us know the results.
This option is available in all interfaces:
// Command-line
testcafe chrome tests --experimental-proxyless
// Programmatic
const testcafe = await createTestCafe({ experimentalProxyless: true });
// Configuration file
{
"experimentalProxyless": "true"
}
Note that at present it is an experimental mode.
Also, the Proxyless
mode is implemented only in Google Chrome. It will not work correctly if you run tests in a non-Chrome browser or in a combination of other browsers.
Node Version - 19.3.0 TestCafe Version - 2.3.0 Browser - Chrome
When experimentalProxyless=true, testcafe is not clicking _search button( or after clicking browser is not responding) and it fails
Script Used to reproduce with Public Website 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,"200 MAIN ST, NORTHAMPTON, MA 01060",{paste:true}) await t.wait(2000) await t.click(_search) await t.expect(_search.visible).notOk();
})
Hi @aprabh001c,
This issue is not reproduced with combination of testcafe@3.0.1
and the Google Chrome browser. Feel free to reopen this issue if you encounter it in other browsers.
What is your Scenario?
When TestCase fail due to assertion, it throws an uncaught exception, sometime it leads to testcase termination. Which is affecting automated run. I have tried to replicate this issue in a public website. Please refer details in respective sections
What is the Current behavior?
1) AssertionError: expected false to be truthy
2) Uncaught exception:
TestCafe Version - 1.18.2 Node Version - v14.17.0
What is the Expected behavior?
Test should fail without any exception.
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=>{ await t.navigateTo("https://www.xfinity.com/learn/offers"); await t.wait(10000); await t.expect(Selector('#localization-address-fieldJunk').visible).ok() })Your complete configuration file
No response
Your complete test report
No response
Screenshots
2) Uncaught exception:
Steps to Reproduce
1. 2. 3.
TestCafe version
1.18.2
Node.js version
v14.17.0
Command-line arguments
testcafe chrome -F UnHandledException
Browser name(s) and version(s)
Chrome 97.0.4692.99
Platform(s) and version(s)
Windows 10
Other
No response