Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Selectors not working when app is Ionic running in native iOS #2636

Open
@DavidFrahm

Description

@DavidFrahm

Some of us in the Ionic community been trying to create a solid E2E/acceptance test example for Ionic apps.

We have this sample project https://github.com/tombuyse/ionic-appium-protractor-example which is the simplest example from scratch of using Protractor + Appium to run tests of an Ionic hybrid mobile app. (Full blog post at http://tombuyse.com/end-to-end-testing-an-ionic-application-with-appium-and-protractor/)

The example works perfectly for Android emulator, but the selectors/async fails horribly for iOS simulator.

Here are my changes for iOS capabilites from the github repo:

    // ios
    capabilities: {
      platformName: 'iOS',
        platformVersion: '9.0',
        deviceName: 'iPhone 6s',
        browserName: "",
        autoWebview: true,
        app: '/Users/your_username/projects/ionic-appium-protractor-example/platforms/ios/build/emulator/ionicAppiumProtractorExample.app'
    },

Here is the protractor test failure output:

$ protractor protractor-config.js 
Using the selenium server at http://localhost:4723/wd/hub
[launcher] Running 1 instances of WebDriver
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was: 
unknown
FA Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was: 
unknown
FA Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was: 
unknown
FA Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was: 
unknown
F

Failures:

  1) Testing the chats tab should be able to click on the chats tab
   Message:
     timeout: timed out after 30000 msec waiting for spec to complete
   Stacktrace:
     undefined

  2) Testing the chats tab should be able to see all chats
   Message:
     timeout: timed out after 30000 msec waiting for spec to complete
   Stacktrace:
     undefined

  3) Testing the dash tab should be able to see the displayed products
   Message:
     timeout: timed out after 30000 msec waiting for spec to complete
   Stacktrace:
     undefined

  4) Testing the dash tab should find all images
   Message:
     timeout: timed out after 30000 msec waiting for spec to complete
   Stacktrace:
     undefined

Finished in 143.345 seconds
4 tests, 4 assertions, 4 failures

[launcher] 0 instance(s) of WebDriver still running
[launcher]  #1 failed 4 test(s)
[launcher] overall: 4 failed spec(s)
[launcher] Process exited with error code 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions