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
- 派生
- 755
- 平均合并
- 5 天 14 小时
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
appium/java-client 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
appium/java-client#2426 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 50/100
appium/java-client#2372 ·
维护者通常 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 天内回复
查看 appium/java-client 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
checkstyle/checkstyle#21755 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2782 ·
维护者通常 1 天内回复
-
documentation Good for newcomer quick win
难度 2/5 1-3 小时 新手友好度 68/100
CodeForPhilly/benefit-decision-toolkit#519 ·
维护者通常 1 天内回复
-
area-deployment triage:bot-seen triage:needs-human
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/aspire#20533 · 1 条评论 ·
维护者通常 1 天内回复