Explain Test.setpage()?



Explain Test.setpage()?..

Answer / Mohit Kumar Sharma

In Salesforce, Test.setPage() is a static method used within test classes to navigate to a specific page or Visualforce page in order to perform testing operations on it. The method takes a String argument representing the URL of the page to be navigated to. For example: Test.setCurrentPage(PageReference pr = new PageReference('/apex/MyVisualforcePage'));

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What are sharing rules in Salesforce?

1 Answers  


What is the Lightning Experience?

1 Answers  


Explain Data Migration in Salesforce?

1 Answers   TCS,


What are dependent fields?

1 Answers  


What is a “lookup relationship”?

1 Answers  


How many lookup relationship fields can be created in an object?

1 Answers  


What is scope in batch apex?

1 Answers  


Why do we use Set, List and Map? give an example for it?

1 Answers   Cognizant,


What is difference between “export” and “export all” in apex data loader? : salesforce Data Management

1 Answers  


What is dataloader?

1 Answers  


Can a trigger make a call to apex callout method?

1 Answers  


What are the implications of implementing database.stateful?

1 Answers  


Categories