I am trying to automate log in into the site but I keep getting an error
Test threw an exception
ReferenceError: Class is not defined
I am unfamiliar with Siesta but I am thoroughly delving into the documentation for classes. Is there something else I need to do to the class or to the index.js/index.html? Below is the login test class that I set up.
Class('login.LoginTestClass', {
isa: Siesta.Test.ExtJS,
methods : {
login : function () {
t.chain(
function (next) {
t.type('>> #username', 'username',next);
},
function (next) {
t.type('>> #password','password', next)
},
function (next) {
t.click('>> #submit', next)
}
);
}
}
});
You need to include the file with your test class on the harness page, not in the "preload". Also, in the test class methods, instead of "t" use "this".
I have looked at that guide but I am still lost. I am trying to call a class from a testing file but it does not seem to work. Am I supposed to set up a separate file to recall the login information or do I reference it in the test file.
test file -> reference login class
--or--
test file,
reference file --> reference login class