GithubHelp home page GithubHelp logo

askui / askui-example-android-multi-device Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 226 KB

This example project shows how to connect to two Android devices for testing

License: MIT License

TypeScript 100.00%

askui-example-android-multi-device's Introduction

askui-example-android-multiple-devices

Example of using AskUI together with two Android devices. In this example, AskUI is used to click on two devices on a text.

Prerequisites

  • Two Android Devices connected to the local device
  • adb is installed

Install

npm install

Configure

Set the following environment variables to configure the example. The ASKUI_WORKSPACE_ID and ASKUI_TOKEN are required to connect to the askui services. Read our docs on how to get them: Windows Linux, macOS.

  1. Copy the .env.template to .env and insert the value for ASKUI_WORKSPACE_ID and ASKUI_TOKEN e.g.

.env-example

ASKUI_WORKSPACE_ID=<your_workspace_id>
ASKUI_TOKEN=<your_workspace_token>
  1. Configure your two Android devices with following Guide Setup Real Android Devices

Windows

Nothing Todo. The AskUI Controller is available inside the AskUI Shell

Mac, Linux

  1. Note Mac, Linux only: Download the controller Mac (Intel) | Mac (ARM) | Linux and copy it to this project askui-example-android-multiple-devices/askui-ui-controller.{exe,dmg,AppImage}

Usage

First we check if both Android devices are connected. This should look like:

$ adb devices
emulator-5556 device product:sdk_google_phone_x86_64 model:Android_SDK_built_for_x86_64 device:generic_x86_64
emulator-5554 device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86

Now we have to open a terminal for each AskUI Controller and start it on different ports.

Windows

# Open AskUI Shell
askui-shell

# Start first AskUI Controller on Port 6769 for android device 0 (emulator-5556)
AskUI-StartController -DisplayNum 0 -Runtime android -Port 6769

# Start second AskUI Controller on Port 6869 for android device 1 (emulator-5554)
AskUI-StartController -DisplayNum 1 -Runtime android -Port 6869

Linux

# Connects to the first device returned by 'adb devices'
./askui-ui-controller.AppImage --host 0.0.0.0 -p 6769 -d 0 -m -r android

# Connects to the second device returned by 'adb devices'
./askui-ui-controller.AppImage --host 0.0.0.0 -p 6869 -d 1 -m -r android

macOS

# Start first AskUI Controller on Port 6769 for android device 0 (emulator-5556)
./askui-ui-controller --host 0.0.0.0 -p 6769 -d 0 -m -r android

# Start second AskUI Controller on Port 6869 for android device 1 (emulator-5554)
./askui-ui-controller --host 0.0.0.0 -p 6869 -d 1 -m -r android

Now both controllers should be connected to the device.

Then let's run the workflows with:

npm run askui

Afterwards there should be two reports under html screenshots ./report/

askui-example-android-multi-device's People

Contributors

johannesdienst-askui avatar programminx-askui avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.