Issue with cy.origin() and otplib Integration in Cypress Tests #30646
Unanswered
Padmini-bulnda
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Cypress Community,
I’m facing an issue while trying to use cy.origin() in combination with otplib for 2-factor authentication in my Cypress tests. Despite enabling the experimentalOriginDependencies flag, I'm encountering errors related to process is not defined and challenges with passing dependencies correctly.
Here's the relevant part of my code:
import data from "../../fixtures/user.json";
class LoginPage {
webLocators = {
username: '#awsui-input-0',
password: '#awsui-input-1',
nextbtn: '.awsui-button',
submitbtn: 'button[type="submit"]',
Authenticatorbtn: "input[value='TOTP']",
Pointer: "a[class='pointer']",
secretkeylink: "span[class='secret-key awsui-util-mr-s']",
Inputsecter: 'input[type="text"]'
}
}
export default new LoginPage();
I've made sure that:
Any insights or suggestions on how to properly pass dependencies and handle this issue within the cy.origin() block would be greatly appreciated.
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions