Closed Rogeriohsjr closed 7 months ago
Hi @Rogeriohsjr , unfortunately we do not have a salesforce instance to test against so we won't be able to replicate this issue. I do see that you are using a version of Cypress that is quite old at this point. Can you please try upgrading to the latest to see if that resolves your issues? We have addressed many Salesforce specific problems since 10.9.0.
Hi @nagash77 , thanks for replying, sorry about the confusion but I am using the 13.2.0 cypress version, when I was opening the issue I noticed that then I updated to see if the issue persists and it does, I forgot to update the github issue.
Regards to salesforce access, you can create your own instance, the steps in the repository is showing the link how you can create that, it is very straight forward after you fill the form you will get a link in your email with an instance. Salesforce provides a dev org for free so anyone can use that.
Let me know if that helps, thanks.
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
This issue has been closed due to inactivity.
Current behavior
Hi There,
I am trying to run cypress in Salesforce using Salesforce Classic Experience and I am getting the error below:
Error stack:
`The following error originated from your application code, not from Cypress.
cy.origin('https://xxx.my.salesforce.com', () => {
cy.on('uncaught:exception', (e) => {
})
})
cy.visit('https://xxxx.my.salesforce.com/home/home.jsp')
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the uncaught:exception event.Learn moreLearn more`
I have tried to disable the chromeWebSecurity, but didn't work out. I have tried to use origin as the error suggested, and didn't work, I need to use visit since I need to pass parameter in the URL(/secur/frontdoor).
I think the problem is that after salesforce authenticate, then I go to 'https://xxxx.my.salesforce.com/home/home.jsp' and after that salesforce goes to another domain('https://xxxx.my.file.com) to do some other business there, and then I get the error. I can't change salesforce behavior, so I was wondering if there is a flag somewhere in cypress that doesn't limit the app to use different domains.
Desired behavior
I should be able to load salesforce page using classic layout.
Test code to reproduce
To reproduce this issue you can:
https://github.com/Rogeriohsjr/cypress-salesforce
Do all the steps and make sure you can connect to sf using LEX (Lightning Experience)
Now let's change the baseURL in cypress.config.js to https://xxx.my.salesforce.com/, xxx is your orgs name same pattern that you have in lightning which was https://xxxx.lightning.force.com/
You can login manually to your org and click to your profile, then you have an option Switch to Salesforce Classic.
Cypress Version
10.9.0
Node version
18.14.2
Operating System
Windows
Debug Logs
No response
Other
No response