Parallel usage results in a "socket hang up" error. systemPort have set but still have the problem.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện bài kiểm tra hai luồng với hai thiết bị Android, sử dụng endpoint webdriver.Remote được hiển thị và các giá trị systemPort khác nhau. Kiểm tra đầu ra của máy chủ Appium và các lỗi tạo session để xác định tại sao một session báo socket hang up; hoàn thành khi cả hai session chạy tap và thoát thành công song song.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1.8k
- Fork
- 570
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 24
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appium/python-client
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
appium/python-client#1230 · 1 bình luận ·
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
appium/python-client#1168 · 9 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
appium/python-client#1147 · 7 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
appium/python-client#1091 · 4 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
appium/python-client#1076 · 2 bình luận ·
Tất cả issue của appium/python-client
Issue tương tự
-
link-check link-check:sphinx-theme
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
OpenHands/extensions#626 · 1 bình luận ·
-
Change observation tooltip text Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
CSCfi/sd-search-api#39 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100