We're building a Hybrid Native Application (Cordova/Phonegap/Angular/Ionic).
I'm writing end-to-end tests in Protractor. When run locally, they execute against the application served by the Ionic simulator (ionic serve). This works fine.
I also want to run the same tests against the 'packaged/built' application on a platform simulator, hosted by Sauce Labs (Appium). This almost works.
The trouble I'm having right now is navigating to the application. When run locally, at the beginning of the test I'll navigate to the application hosted by ionic:
browser.get('http://localhost:8100')
This obviously doesn't work in a simulator running a hybrid native app. I inspected the current Url of the browser when the test starts up and it is:
file:///android_asset/www/index.html#/login
This makes sense and is correct. But if I try to:
browser.get('file:///android_asset/www/index.html#/login')
bad things happen.
I'm looking for one of two solutions:
1) understand how to navigate to Urls for a hybrid native app run in a simulator
OR
2) somehow have the test know that it's running within the hybrid native cordova container and skip navigating to the starting page (since the application is loaded automatically by the appium).
Thanks.