You need to sign in to do that
Don't have an account?
ankitha varra
How to test the site.login(username, password, startUrl) in salesforce
Hai,
there is a scenario there i want to test site.login(username,password,starturl) in salesforce
there is a scenario there i want to test site.login(username,password,starturl) in salesforce
@isTest
private class testLogin{
//this is mandatory declaration
private static Pagereference newPage;
//this declaration is optional
private static yourclass variableofClasstype;
private static testmethod void myTestmethod(){
Test.startTest();
//this is optional
variableofClasstype=new yourClass();
//this is mandatory
newPage=site.login(username,password,startURL);
Test.stopTest();
}
}