https://cypress.io logo
Title
c

colossal-table-38461

05/25/2023, 11:10 AM
Hello All. I am working on 1 scenario, but facing 1 different issue. Scenario : 1. visiting url using cy.origin('microsoftonline.com') 2. visiting application url using cy.visit('applicationUrl') 3. then entering automation credentials from config.js 4. then further code But on runner while running the Code it's taking my own credentials Also its directly opening the Password page not the Username Page Any idea how to resolve it? Code snippet : Given('Logging to application', function() { cy.origin(Cypress.env("microsoftUrl"), () => { cy.visit(Cypress.env('ApplicationUrl')) cy.get('locator').type(Cypress.env('testUser')) cy.get('locator').click() cy.get('locator').type(Cypress.env('testPassword')) cy.get('locator').click() }) })