Feature: PageFactory implementation for By/AppiumBy object types
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
該 issue 描述了一個針對 By 和 AppiumBy 物件型別的自訂 PageFactory 提案,但沒有指出檔案、測試或進入點。首先確認 Appium 社群是否需要此功能,並在實作之前明確預期範圍和驗收標準。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Java
- 星號
- 1.3k
- 分支
- 757
- 平均合併
- 16 小時 15 分鐘
- 30 天內合併 PR
- 28
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
appium/java-client 的其他 Issue
-
難度 5/5 一週以上 新手友好度 25/100
appium/java-client#2426 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 30/100
appium/java-client#2368 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 30/100
appium/java-client#2341 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 15/100
appium/java-client#2323 ·
維護者通常 1 天內回覆
-
java-client 启动报错未關閉
難度 3/5 1-2 天 新手友好度 35/100
appium/java-client#2288 · 1 則留言 ·
維護者通常 1 天內回覆
查看 appium/java-client 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
quarkiverse/quarkus-google-cloud-services#1187 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
locationtech/jts#1250 ·
-
type/improve
難度 2/5 1-3 小時 新手友好度 75/100
-
bug
難度 2/5 1-3 小時 新手友好度 71/100
linagora/twake-calendar-side-service#1235 · 1 則留言 ·
維護者通常 1 天內回覆
-
Good First Issue
難度 1/5 1 小時以內 新手友好度 75/100
hiero-ledger/hiero-sdk-java#3025 ·
維護者通常 1 天內回覆