I'm trying to create a page in my test class like this:
PageReference pageRef = Page.testPage; Test.setCurrentPage(pageRef);
But I'm getting an error:
Compilation error: Page testPage does not exist.
What I'm doing wrong here?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community