Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature: PageFactory implementation for By/AppiumBy object types

Đang mở
#1,940 2 bình luận 3 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
mobile

Hướng nghiên cứu

Issue mô tả một PageFactory tùy chỉnh được đề xuất cho các kiểu đối tượng By và AppiumBy, nhưng không nêu tệp, bài kiểm thử hoặc điểm vào nào. Trước tiên, hãy xác nhận liệu cộng đồng Appium có muốn tính năng này hay không, đồng thời xác định phạm vi dự kiến và các tiêu chí chấp nhận trước khi triển khai.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

TL;DR, I would like to know if there will be demand/usage for such an implementation. I have ready code if there is interest, the details are shared below.

Environment

  • Java client build version or git revision if you use some snapshot: 8.5.0
  • Appium server version or git revision if you use some snapshot: v2.0.0-beta.71

Details

I recently encountered the following struggle:

I was re-building a cross-platform testing solution and was about to implement changes with PageFactory, as it’s a very efficient way to build tests fast and with less code for 2 platforms at the same time. What happened is that one of the internal SDK’s, used by the project in question, got updated to Java 17 and created a compatibility issue with PageFactory (the problem is that PageFactory uses cglib, which is not maintained nor updated for Java17).

After some thinking I went ahead and implemented a custom and very simplified implementation of a custom PageFactory, which works with By, instead of WebElement. The reasons I did it like that are:

  • Simplicity - this way the code is quite simplified, without having to instantiate the actual WebElements right away and thus no need for complicated proxying of the objects.
  • Flexibility - WebElements are great but they are not as flexible as the By locators, and also can be acquired at will as long as you have the By for the given element, but not the other way around.

This ended up being quite effective and I was wondering if this is something that may be of interest/demand? I can contribute my code if moderators agree this could be useful for many many people, I just want to know if this is something that the Appium community may be interested in. It’s purpose will not only be a (more stable) alternative for PageFactory, but also maybe a successor for it, unless the Selenium community updates that part of Selenium to not depend on cglib.

Ngôn ngữ chính
Java
Star
1.3k
Fork
755
Merge trung bình
5 ngày 14 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của appium/java-client

Tất cả issue của appium/java-client

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.