I have a hybrid app build with Ionic framework and would like to test on the emulator using protractor. How can I setup to run test on emulator using protractor?
Here is what I have attempted so far:
1) All my test run in the browser fine.
2) installed Appium (http://appium.io/)
3) modified my protractor.config.js file:
exports.config = {
seleniumAddress: 'http://localhost:4723/wd/hub',
specs: [
'e2e/*_spec.coffee'
],
capabilities: {
browserName: '',
'appium-version': '1.3',
platformName: 'iOS',
platform: 'Mac',
platformVersion: '8.2',
deviceName: 'iPhone 5s',
app: 'absolute_path/platforms/ios/build/emulator/taco.app'
},
baseUrl: 'http://localhost:8100',
};
This launches the emulator, however, not test are running. Here is a sample spec...
describe 'Taco', ->
describe 'Login', ->
beforeEach ->
browser.get('http://localhost:8100')
browser.executeScript('window.localStorage.clear();')
browser.waitForAngular()
it 'should login with valid credentials', ->
expect(element(By.css('.home-template')).isPresent()).toBe(true)
element(By.linkText('I have an account')).click()
element(By.model('credentials.email')).sendKeys('taco1@taco.com')