Hi All, I am trying to pass JavaScript class object created to cy.origin function but it’s always coming up as function not defined.
// loginPage.js
Class loginPage(){
Login(){
//code}
}
Const Obj= new loginPage()
export default Obj;
//
///Test script
Import Obj from loginPage.js
it(‘Should login to inventory page’, () =>{
cy.visit(something)
cy.origin(){
Obj.login();
}
})
Getting error function not defined. How do I pass the object from the JavaScript class to the cy.origin function??
#1064946933187235880 #763114122065739818