I tell you my problem, I was testing the cypress tool on a page that makes purchases online, when doing a test with the following code:
let button_add_cart= "#add-to-cart-button-4";
//cy.wait(3000);
cy.get(button_add_cart)
.click();
//cy.wait(5000);
//let button_2= "#topcartlink > a > span.cart-label";
cy.get('#bar-notification > div > p > a')
.click();
The second Get references another to href,this when executed, I throw the following error first
To solve this I should add en archivo cypress.json the property "chromeWebSecurity": false. But when added it throws me the error chrome-error://chromewebdata/
By also adding the property "baseUrl": "http://demo.nopcommerce.com", this domain change but when changed as shown in the image, it does not pass the added articles, which breaks the test flow.
cy.visit('/cart');
let value= ".product-unit-price";
let costo = "$1,800.00";
cy.get(value)
.contains(costo);
When changing path this should pass me the added items
I would appreciate the help
cypress.json
I am interesting about "baseUrl":
googe.com
or? Upgrading the version to 6.1.0
helped me get rid of same issue.
I did following steps for updation:
npm install --save-dev cypress@6.1.0
OR yarn upgrade cypress@6.1.0
$node_modules/.bin/cypress open
In my case, I was getting chrome-error://chromewebdata/
because the test involved submitting a <form>
into a URL that wasn't responding.
It was <form method="POST" action="https://localhost:8443/something">
but there was no server listening at localhost:8443
, I forgot I was using another address.
So it was a good thing the test failed (the test was wrong), but I wish Cypress told me something like "Unable to connect to localhost:8443" instead of saying chrome-error://chromewebdata/
. I would have noticed my mistake much sooner...