LoginSignup
2
4

More than 1 year has passed since last update.

PythonでWindowsアプリを自動化する【開発環境構築】

Last updated at Posted at 2021-07-09

【開発環境構築】
1.Pythonをインストールする
  pip(Pythonパッケージ管理ツール)もインストールされます。
  
2.Python用のAppiumライブラリのインストール
   pip install robotframework-appiumlibrary

   以下のライブラリも含まれています。
   Appium-Python-Client
    pip install Appium-Python-Client
   selenium
    pip install selenium

3.WinAppDriverUiRecorderをダウンロードする
  https://github.com/microsoft/WinAppDriver/releases/tag/UIR-v1.1
  操作したい画面等の要素のxpathを知るためのツールです。
  exe直起動して使うアプリです。
  inspect.exeでは、xpathが取れない?ので、WinAppDriverUiRecorderは必須と言えよう。
  なお、inspect.exeは私のPCでは以下にありました。  
  C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86
  
4.Windows Application Driverをダウンロードして起動する
  https://github.com/microsoft/WinAppDriver
  exe直起動アプリです。
  このコンソールアプリを事前に起動しておいて、PGからセッションを接続する使い方です。
  ただしこれを起動するには、Windows10を開発者モード(developer mode)にしておく必要があります。

  こんなbatファイルを作ると便利!
  cd C:\Program Files (x86)\Windows Application Driver
  WinAppDriver.exe 4999

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4