Feature: PageFactory implementation for By/AppiumBy object types
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
この 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時間
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
appium/java-client のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
appium/java-client#2426 ·
メンテナーはふだん 5 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
appium/java-client#2372 ·
メンテナーはふだん 5 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
appium/java-client#2368 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
appium/java-client#2341 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
appium/java-client#2323 ·
メンテナーはふだん 5 日以内に返信
appium/java-client の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
refinedmods/refinedstorage2#1414 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
In Java's `LongBoundedSum`, setting `lower` to `Long.MIN_VALUE` under-estimates the sensitivityオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
google/differential-privacy#489 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
link-check link-check:manual
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100