cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.04k stars 3.18k forks source link

Unable to access saleforce lighting using cypress UI #28637

Open FarazQualitest21 opened 10 months ago

FarazQualitest21 commented 10 months ago

Current behavior

I am trying to hit my salesforce ui lightning version but i am facing that cypress is stuck with 'your tests are loading', Though same scripts are working for classic version

Desired behavior

No response

Test code to reproduce

sandboxhomepage: 'https://unilever--cgdev.sandbox.my.salesforce.com/',

Given(/^login with the select '(.*)'$/, (url) => {

    Homepage.initializeurl(url)
    Homepage.enterUserIDandPwd(appData.salesforce.username, appData.salesforce.password)
});

Then(/^creating none case$/, () => {
    Homepage.createNoneCase()
})

cy.visit('sandboxhomepage')

Cypress Version

13.6.1

Node version

18.14.0

Operating System

macOS sonoma(14.2)

Debug Logs

No response

Other

No response

jennifer-shehane commented 10 months ago

@FarazQualitest21 Do you happen to have modifyObstructiveCode set to false in your cypress.config.js file? If this is set to true, I believe this should work.

FarazQualitest21 commented 10 months ago

Hi @jennifer-shehane thanks for your reply even though i am setting it false it is still not working Please have a look at this video this is what exactly happening

https://github.com/cypress-io/cypress/assets/152856590/25b0005b-a549-42ef-aa80-9f518de8d3f9

And it will stuck here only

jennifer-shehane commented 10 months ago

Yah this is a super weird issue. For many, many, many different reasons now we have had trouble testing Salesforce sites. They do a lot of strange things behind the scenes that are unconventional from other websites. This looks like a bug.

FarazQualitest21 commented 10 months ago

Is there any way around to test like API login if yes can you please suggest me how can i do it? @jennifer-shehane

jennifer-shehane commented 10 months ago

@FarazQualitest21 I don't have anything specific to point to, but there may be some resources out there.

FarazQualitest21 commented 10 months ago

Do we know when this can be fixed @jennifer-shehane

AlinaSkilsaraFreshcode commented 8 months ago

I saw the same issue for Saleforce Lightning, a temporary solution was adding experimentalModifyObstructiveThirdPartyCode: true to cypress e2e config

thsrv commented 4 months ago

do we have any solution?