目录

How do I resolve the "Load Page Failed: pages/Index" error that occurs when the ohosTest file references the exported method of the startup page?

Symptom

When the ohosTest file references the exported method from the launch page and an attempt is made to launch the ability that contains the startup page, a JS crash occurs with the "Load Page Failed: pages/Index" error message during the test execution.

Solution

When launching the ability that contains the startup page, explicitly specify the name of the current module. Run the test again.