AWS device farm react native appium webdriverio test's not working

0

Hi,
I have created test for React Native application using Appium and WebdriverIO, it's working fine locally on android emulator and on real device, but it's not working on aws device farm.
This tutorial https://medium.com/jetclosing-engineering/react-native-device-testing-w-appium-node-and-aws-device-farm-295081129790 I followed to create test.
Issue is
2020-05-06T14:01:27.388Z INFO webdriver: DATA { using: 'accessibility id', value: 'loginEmail' }
2020-05-06T14:01:27.390Z INFO webdriver: COMMAND findElement("accessibility id", "app-root")
2020-05-06T14:01:27.393Z INFO webdriver: [POST] http://127.0.0.1:4723/wd/hub/session/5a7350a3-e8c2-4c9e-b31a-347ea4defcdb/element
2020-05-06T14:01:27.393Z INFO webdriver: DATA { using: 'accessibility id', value: 'app-root' }
[0-0] TypeError in "Simple App testing Valid Login Test"
$(...).setValue is not a function

the same issue is for waitForDisplayed $(...).waitForDisplayed is not a function

Device Farm Project Test URL: https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/projects/df9dc8c9-3ddc-4822-85ef-1991208ae80e/runs/31e7f665-380e-4e21-bd17-8ff085474ecb

Below is my package.json file
{
"name": "tests",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "npm install && npx wdio ./wdio.conf.local.js",
"package": "npm install && npm-pack-zip"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@wdio/cli": "^6.1.2",
"@wdio/local-runner": "^6.1.2",
"@wdio/mocha-framework": "^6.1.0",
"@wdio/spec-reporter": "^6.0.16",
"@wdio/sync": "^6.1.0",
"wdio-chromedriver-service": "^6.0.2",
"chromedriver": "^81.0.0",
"chai": "^4.2.0",
"webdriverio": "^6.1.2"
},
"devDependencies": {
"npm-bundle": "^3.0.3",
"npm-pack-zip": "^1.2.7"
},
"bundledDependencies": [
"@wdio/cli",
"@wdio/mocha-framework",
"@wdio/local-runner",
"@wdio/spec-reporter",
"@wdio/sync",
"webdriverio",
"chai",
"chromedriver",
"wdio-chromedriver-service"
]
}

Below is my wdio.config.js file
exports.config = {
runner: 'local',
specs: [
'./test/specs/**/.js'
],
exclude: [
// 'path/to/excluded/files'
]
maxInstances: 1,
capabilities: [{
maxInstances: 1,
appWaitDuration: 100000,
appWaitActivity: '
'
}],
logLevel: 'info',
bail: 0,
baseUrl: 'http://localhost',
path: '/wd/hub',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: 'appium',
port: 4723,
framework: 'mocha',

reporters: 'spec',  

mochaOpts: {  
    ui: 'bdd',  
    timeout: 60000  
},  

}

Below is my yml file install and test phases
phases:
install:
commands:
- npm install -g appium
- export APPIUM_VERSION=1.17.0
- avm $APPIUM_VERSION
- ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js

  - cd $DEVICEFARM_TEST_PACKAGE_PATH  
  - echo $DEVICEFARM_TEST_PACKAGE_PATH  
  - npm install  

test:
commands:
- echo "Navigate to test source code"
- cd $DEVICEFARM_TEST_PACKAGE_PATH/node_modules/*

  - echo "Start Appium Node test for Qbunk Android"  
  - ls  
  - echo $DEVICEFARM_TEST_PACKAGE_PATH  
  - npm install  
  - echo "Installing wdio"  
  - npm install --save webdriverio @wdio/cli  
  - echo "Installing chai"  
  - npm install --save chai  
  - npx wdio $DEVICEFARM_TEST_PACKAGE_PATH/wdio.conf.js --spec $DEVICEFARM_TEST_PACKAGE_PATH/test/specs/*.js            

Interesting thing is that this https://aws.amazon.com/blogs/mobile/testing-mobile-apps-across-hundreds-of-real-devices-with-appium-node-js-and-aws-device-farm/ AWS tutorial I followed and write my test with wd working fine on AWS Device farm.

Kindly let me know if you need more information.
Thanks

질문됨 4년 전990회 조회
1개 답변
0
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠