Skip to content

DougSantos3/template_app_webdriverio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobile application automation with WebDriverIO and Appium


Quality Gate Status Bugs Code Smells Duplicated Lines (%)


Examples


This is a Test QA - project using webDriverIO and Appium Appium

Getting Started

You need to download the packages:

# Node
v20.18.0 lts
# npm version: 11.0.0 and download dependencies
npm install
# Open Appium
appium
# You need install uiautomator2 in you OS
# Bellow download in linux
appium driver install uiautomator2
appium driver install xcuitest

Run tests:

# Android device
npm run test:android

# BrowserStack Android device(building)
npm run test:android:browserstack

# IOS device(building)
npm run test:ios

# BrowserStack IOS device(building)
npm run test:ios:browserstack

Tests Overview

  • Test on the home page validating the text on it.
  • Test in the web view by clicking the side menu on the API option and validating the text that appears after clicking the menu.
  • Test on login, authenticating, creating a new user, and validating each error if any field is not filled in during registration.
  • Test forms, validate text input and display below, toggle button, button that shows a modal, and dropdown.

About capture elements

You need to use the command in the terminal to keep Appium running.

appium --base-path /wd/hub


You need to download the appium-inspector.

This is the app

Examples

Enter Credentials

Remote Host: 127.0.0.1 Remote Port: 4723 Remote Path: /wd/hub

Android

{
  "platformName": "Android",
  "appium:platformVersion": "15.0",
  "appium:deviceName": "Smarthphone - Pixel 8 Pro API 35",
  "appium:app": "./apps/android.wdio.native.app.v1.0.8.apk",
  "appium:appPackage": "com.wdiodemoapp",
  "appium:appActivity": ".MainActivity",
  "appium:automationName": "UiAutomator2"
} 

"appium:platformVersion" is the operating system version of the Android emulator or physical device

The "appium:deviceName" is the same name as the emulator in your android studio or physical device. Example in emulator:

Examples

Examples of how appium inspector fields are filled in

Examples

Then just start the section


Tips

To discover the name appPackage

adb install path_from_the_root_of_your_repository/test_qa_app/apps/android.wdio.native.app.v1.0.8.apk

Check which package

adb shell pm list packages | grep wdio

After running the tests, a website with the Allure report will open in the Browser. Note that the current terminal session will be locked to the report; if you close the terminal, the report will no longer be accessible. However, you can use this command to view it again: npm exec allure open and it will display a link in the terminal. Copy it and access it in the browser to see the test cases again.

About

Teste automatizado em aplicativo Android usando o WebdriverIO com o Appium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages