cypress-io / cypress

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

"Your test are loading..." keep showing when clicking on login button #27989

Closed PranjalRsystems closed 6 months ago

PranjalRsystems commented 1 year ago

Current behavior

I am new to cypress. I am trying to execute some steps on a salesforce app though cypress.

I am trying to login on this URL - "https://servicetitan--cpqdev0830.sandbox.my.salesforce.com" which is working fine but after clicking on login button it is redirecting to another URL - "https://servicetitan--cpqdev0830.sandbox.lightning.force.com/lightning/page/home". At this point my test runner gets into an infinite reload mode and nothing shows up in the logs too.

Also the element inspector doesn't work on this page.

Attaching the video of the execution below -

https://github.com/cypress-io/cypress/assets/145104438/dd19dd89-6654-43c2-a703-b063807f07e7

Desired behavior

The test runner should not get reloaded when moving from one URL to another and the logs should also gets generated.

Test code to reproduce

Test case file -

import { LoginPage } from "./pages/login_page"

const loginpage = new LoginPage

it('POM', function(){

// Cypress.on('uncaught:exception', (err, runnable) => { // console.log(err); // return false; // }) cy.visit('/') loginpage.enterUsername('araavuri@servicetitan.com.cpqdev0830') loginpage.enterPassword('anudeep@169') loginpage.clickLogin() loginpage.clickSetup() })

Web Page FIle -

export class LoginPage{

username_textbox = '#username'
password_textbox = '#password'
login_button = '#Login'
setup_button = 'a[class*="setup "]'

enterUsername(username){
cy.get(this.username_textbox).type(username)

}

enterPassword(password){
cy.get(this.password_textbox).type(password)

}

clickLogin(){
cy.get(this.login_button).click()

}

clickSetup(){ cy.get(this.setup_button).click()

}

}

Cypress.config file

const { defineConfig } = require("cypress");

module.exports = defineConfig({ e2e: { defaultCommandTimeout:20000, setupNodeEvents(on, config) { // implement node event listeners here }, baseUrl : 'https://servicetitan--cpqdev0830.sandbox.my.salesforce.com' }, });

Cypress Version

13.3.0

Node version

16.20.2

Operating System

Windows 11

Debug Logs

No response

Other

No response

cypress-app-bot commented 6 months ago

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.

cypress-app-bot commented 6 months ago

This issue has been closed due to inactivity.