Selenoid を使用して Android セッションに接続し、いくつかのテストを実行しようとしています。これは私のコードです:
from appium import webdriver
class MyTestCase():
def poc_appium_android_selenoid(self):
desired_caps = {
"platformName":"Android",
"platformVersion":"7.0",
"automationName":"UiAutomator1",
"deviceName":"android",
"appPackage":"com.android.calculator2",
"appActivity":"com.android.calculator2.Calculator",
"enableVNC":True,
"enableVideo":True
}
driver = webdriver.Remote(command_executor="http://127.0.0.1:4444/wb/hub",
desired_capabilities=desired_caps)
if __name__ == "__main__":
mtc = MyTestCase()
mtc.poc_appium_android_selenoid()
ドライバーの初期化で TypeError が返されます: 「文字列インデックスは整数でなければなりません」。機能をまったく使用しないと、このエラーが持続します。WebDriver クラスのinit内の remote/webdriver.py ファイルでは、157 行目で self.start_session メソッドが実行されているようです。その中で、selenoid が返す execute メソッドが使用されています。
{'status': 0, 'value': 'You are using Selenoid 1.10.3!'}
次に、この行を実行し、応答 obj に sessionId キーがないため失敗します。
self.session_id = response['sessionId']
これはセレノイド構成の問題のようですが、役立つアイデアはありますか? ありがとうございました!