use Magento\TestFramework\Helper\Bootstrap; $objectManager = Bootstrap::getObjectManager();In this code example, we use the Bootstrap helper class to retrieve an instance of the object manager. Package Library: The getObjectManager function is part of the Magento Test Framework, which is included in the Magento Commerce and Magento Open Source packages. It is not a separate package library available for download.