This project contains automated tests for iOS app using WebdriverIO and Appium.
- Node.js (v14 or higher)
- Xcode (latest version)
- iOS Simulator
- Appium
- Install dependencies:
npm install-
Update the
wdio.conf.jsfile with your app-specific configuration:- Update
platformVersionto match your iOS version - Update
apppath to point to your .app file - Update
deviceNameif you want to use a specific simulator
- Update
-
Install Appium and required drivers:
npm install -g appium
appium driver install xcuitest
appium driver install uiautomator2- Start Appium server:
npm run appium- In a new terminal, run the tests:
npm testFor debugging:
npm run test:debug.
├── test/
│ ├── specs/ # Test files
│ └── pageobjects/ # Page objects
├── app/ # Place your .app file here
├── wdio.conf.js # WebdriverIO configuration
└── package.json
- Create page objects in
test/pageobjects/ - Create test files in
test/specs/ - Use the provided base page object for common functionality
- Use page objects pattern for better maintainability
- Keep tests atomic and independent
- Use meaningful test and variable names
- Add comments for complex logic
- Use explicit waits instead of hard delays