function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Test.setCurrentPage(pageRef) not working

This method always was working previously, and my VF page was fine. Now all of a sudden I get this error thrown when the page tries to load "Method does not exist or incorrect signature: Test.setCurrentPage(System.PageReference)".


Sure enough, I forced a recompile of the class and this methid no longer exists!!! What happened?!




Thanks for this post - I was having the same issue and at least now I know why. Is there a workaround I can use here?

Figured it out -


If you have any other method/variable/class etc named TEST it will cause the Test.setCurrentPage method to error. Check to see you haven't named anything 'test' by accident to cause the conflict.


Cheers -