Parallel usage results in a "socket hang up" error. systemPort have set but still have the problem.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
まず、2 台の Android デバイスで、示されている webdriver.Remote エンドポイントと異なる systemPort 値を使用して、2 スレッドのテストを再現します。Appium サーバーの出力とセッション作成エラーを調べ、1 つのセッションで socket hang up が報告される理由を特定します。両方のセッションが並列で tap を実行し、正常に終了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Here's my code:
python
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
import threading
Device 1's configuration
desired_caps1 = {
"appium:appActivity": ".Settings",
"appium:appPackage": "com.android.settings",
"appium:automationName": "uiautomator2",
"appium:udid": "xxxx",
"platformName": "Android",
"appium:systemPort": 8310
}
Device 2's configuration
desired_caps2 = {
"appium:appActivity": ".Settings",
"appium:appPackage": "com.android.settings",
"appium:automationName": "uiautomator2",
"appium:udid": "192.168.137.58:5555",
"platformName": "Android",
"appium:systemPort": 8322
}
def run_test_on_device(desired_caps):
driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) # Corrected URL
width = driver.get_window_size()["width"]
height = driver.get_window_size()["height"]
action = TouchAction(driver)
action.tap(x=width // 2, y=height // 2).perform()
driver.quit()
Use threading for parallel execution
thread1 = threading.Thread(target=run_test_on_device, args=(desired_caps1,))
thread2 = threading.Thread(target=run_test_on_device, args=(desired_caps2,))
thread1.start()
thread2.start()
thread1.join()
thread2.join()
I have set the different systemPort for each devices, but I still have the problem.
How can I sove that, I'm very need to be solved, thanks.
- 主要言語
- Python
- スター
- 1.8k
- フォーク
- 570
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 24
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
appium/python-client のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
appium/python-client#1230 · コメント 1 件 ·
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
appium/python-client#1168 · コメント 9 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
appium/python-client#1147 · コメント 7 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
appium/python-client#1091 · コメント 4 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
appium/python-client#1076 · コメント 2 件 ·
appium/python-client の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
zostera/django-bootstrap4#894 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·