---
# System prepended metadata

title: 軟測環境安裝

---

# 軟測環境安裝

[TOC]

## Windows

1. 安裝python
![image](https://hackmd.io/_uploads/ByONtRJbR.png)

2. 安裝robotframework
```
$ pip install --upgrade robotframework-appiumlibrary
```
![image](https://hackmd.io/_uploads/BJkzoA1bR.png)

```$ python -mpip install --force-reinstall Appium-Python-Client==3.2.1 ```
Appium-Python-Client降版到3.2.1


3. 安裝pycharm and 下面兩個插件

![image](https://hackmd.io/_uploads/rktQ7klb0.png)
![image](https://hackmd.io/_uploads/BJrB7klWA.png)

4. android studio
安裝and開啟 emulator 


5. 
```
$ adb devices
```
![image](https://hackmd.io/_uploads/BJCedkg-C.png)

6. 安裝appium
   ```
   $ npm i -g appium
   $ appium driver install "uiautomator2"
   ```
   ![image](https://hackmd.io/_uploads/HyDfKRk-0.png)
7. 開啟appium 
   ```
   $ appium --allow-cors
   ```
8. Connect to android emulator
https://inspector.appiumpro.com/
![image](https://hackmd.io/_uploads/ryiKpCpNR.png)

![image](https://hackmd.io/_uploads/r1gl0RTVA.png)
   ```json
   {
     "platformName": "Android",
     "appium:automationName": "uiautomator2",
     "appium:platformVersion": "",
     "appium:app": "",
     "appium:deviceName": ""
}
   ```

## ArchLinux

1. Install NodeJS & NPM
   ```shell
   # pacman -S npm nodejs
   ```
2. Install Appium
   ```shell
   # npm install -g appium
   ```
3. Install UIAutomator 2
   ```shell
   $ appium driver install "uiautomator2"
   ```
3. Verify the result
   ```shell
   $ appium -v
   2.6.0
   ```
4. Change to target workdir
5. Create Python virtual environment
   ```shell
   $ python3 -m venv .venv
   ```
6. Enter the Python virtual environment
   ```shell
   $ source .venv/bin/activate
   ```
7. Install robotframework-appiumlibrary
   ```shell
   $ pip3 install --upgrade robotframework-appiumlibrary
   ```
8. Install Android Studio
   ```shell
   $ yay -S android-studio --noconfirm
   ```
9. Install other tools related to Android development
   ```shell
   # pacman -S android-tools android-udev libmtp --noconfirm
   ```

## Build Joplin

* [Unable to load script](https://chatgpt.com/share/4067b9b9-472f-48f1-97b6-15aaf3f9e756)
