Is this within a WebDriver scenario? If so, please note that you can't make use of Ext JS APIs within WebDriver tests, as the tests are run separately from the browser. In order to use Ext JS APIs, you need to use an In-Browser scenario, where the tests run side-by-side with your app code in the browser.