Feature: PageFactory implementation for By/AppiumBy object types
Maintainer antworten meist innerhalb von 5 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
Rechercherichtung
Das Issue beschreibt eine vorgeschlagene benutzerdefinierte PageFactory für Objekttypen vom Typ By und AppiumBy, nennt jedoch keine Dateien, Tests oder Einstiegspunkte. Kläre zunächst, ob die Appium-Community diese Funktion wünscht, und ermittle den erwarteten Umfang sowie die Akzeptanzkriterien vor der Implementierung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 1.3k
- Forks
- 755
- Ø Merge
- 5 T. 14 Std.
- Gemergte PRs (30 T.)
- 8
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus appium/java-client
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
appium/java-client#2426 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 50/100
appium/java-client#2372 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
appium/java-client#2368 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 30/100
appium/java-client#2341 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
appium/java-client#2323 ·
Maintainer antworten meist innerhalb von 5 Tagen
Alle Issues in appium/java-client
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
component/zeebe kind/bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
UniversalMediaServer/UniversalMediaServer#6356 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
refinedmods/refinedstorage2#1414 · 1 Kommentar ·
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
yegor256/rultor-image#76 · 1 Kommentar ·