Skip to content

Commit 5ec663f

Browse files
authored
Merge pull request #459 from TESTARtool/master_android
Android framework is displayed extensions
2 parents 1e8c9c1 + 2a3a697 commit 5ec663f

File tree

18 files changed

+77
-23
lines changed

18 files changed

+77
-23
lines changed

.github/workflows/release-distribution.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
tag_name: v${{ env.GITHUB_MILESTONE }}
5555
body: |
5656
Release notes:
57-
https://github.com/TESTARtool/TESTAR_dev/wiki/TESTAR-release-notes
57+
https://github.com/TESTARtool/TESTAR_dev/blob/master/CHANGELOG
5858
5959
Latest W7 version (2.5.0):
6060
https://github.com/TESTARtool/TESTAR_dev/releases/download/v2.5.0/testar_w7_2.5.0.zip

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#TESTAR v2.7.17 (5-Dec-2025)
2+
- Add allowInvisibleElements to appium-android
3+
- Add AndroidDisplayed Tag property
4+
5+
16
#TESTAR v2.7.16 (28-Nov-2025)
27
- Add AndroidCapabilitiesFactory for creating appium capabilities
38
- Implement AndroidRoles

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ https://github.com/TESTARtool/TESTAR_dev/wiki/Development:-Increase-Java-memory
173173
https://github.com/TESTARtool/TESTAR_dev/issues
174174

175175
## Release notes
176-
https://github.com/TESTARtool/TESTAR_dev/wiki/TESTAR-release-notes
176+
https://github.com/TESTARtool/TESTAR_dev/blob/master/CHANGELOG
177177

178178
## Required tools to create a windows.dll to update UIAutomation API
179179
https://github.com/TESTARtool/TESTAR_dev/wiki/Development:-Update-Windows-UIAutomation-(windows.dll)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.16
1+
2.7.17

android/src/org/testar/monkey/alayer/android/AndroidCapabilitiesFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Result fromJsonObject(JsonObject json) {
7878
cap.setCapability("appium:newCommandTimeout", getInt(json, "newCommandTimeout", 600));
7979
cap.setCapability("appium:autoGrantPermissions", getBool(json, "autoGrantPermissions", false));
8080

81+
cap.setCapability("appium:settings[allowInvisibleElements]", getBool(json, "allowInvisibleElements", false));
82+
8183
String appiumUrl = defaultAppiumUrl;
8284

8385
// If the APK is already installed we use appPackage identifier

android/src/org/testar/monkey/alayer/android/AndroidElement.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public class AndroidElement extends TaggableBase implements Serializable {
7878
boolean longclicklable;
7979
boolean password;
8080
boolean selected;
81+
boolean displayed;
8182

8283
public AndroidElement(){ this(null); }
8384

android/src/org/testar/monkey/alayer/android/AndroidState.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ else if (t.equals(AndroidTags.AndroidSelected)) {
227227
else if (t.equals(AndroidTags.AndroidAccessibilityId)) {
228228
ret = w.element.accessibilityID;
229229
}
230+
else if (t.equals(AndroidTags.AndroidDisplayed)) {
231+
ret = w.element.displayed;
232+
}
230233
else if (t.equals(AndroidTags.AndroidXpath)) {
231234
ret = w.element.xPath;
232235
}

android/src/org/testar/monkey/alayer/android/AndroidStateFetcher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/***************************************************************************************************
22
*
3-
* Copyright (c) 2020 - 2022 Universitat Politecnica de Valencia - www.upv.es
4-
* Copyright (c) 2020 - 2022 Open Universiteit - www.ou.nl
3+
* Copyright (c) 2020 - 2025 Universitat Politecnica de Valencia - www.upv.es
4+
* Copyright (c) 2020 - 2025 Open Universiteit - www.ou.nl
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:
@@ -186,6 +186,7 @@ private void XmlNodeDescend(AndroidElement parent, Node xmlNode) {
186186
childElement.password = AndroidNodeParser.getBooleanAttribute(xmlNode, "password");
187187
childElement.selected = AndroidNodeParser.getBooleanAttribute(xmlNode, "selected");
188188
childElement.accessibilityID = AndroidNodeParser.getStringAttribute(xmlNode, "content-desc");
189+
childElement.displayed = AndroidNodeParser.getBooleanAttribute(xmlNode, "displayed");
189190

190191
childElement.rect = androidBoundsRect(AndroidNodeParser.getStringAttribute(xmlNode, "bounds"));
191192
childElement.bounds = androidBoundsRect(AndroidNodeParser.getStringAttribute(xmlNode, "bounds"));

android/src/org/testar/monkey/alayer/android/enums/AndroidTags.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ private AndroidTags() {}
7474

7575
public static final Tag<String> AndroidAccessibilityId = from("AndroidAccessibilityId", String.class);
7676

77+
public static final Tag<Boolean> AndroidDisplayed = from("AndroidDisplayed", Boolean.class);
78+
7779
public static final Tag<String> AndroidXpath = from("AndroidXpath", String.class);
7880

7981
public static final Tag<String> AndroidAbstractActionId = from("AndroidAbstractActionId", String.class);

android/src/org/testar/monkey/alayer/android/spy_visualization/TreeVisualizationAndroid.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ private void displayWidgetInfo(Widget nodeWidget) {
297297
boolean longClickableWidget = nodeWidget.get(AndroidTags.AndroidLongClickable);
298298
boolean scrollableWidget = nodeWidget.get(AndroidTags.AndroidScrollable);
299299
boolean selectedWidget = nodeWidget.get(AndroidTags.AndroidSelected);
300+
boolean displayedWidget = nodeWidget.get(AndroidTags.AndroidDisplayed);
300301
String xpathWidget = nodeWidget.get(AndroidTags.AndroidXpath);
301302
String activityWidget = nodeWidget.get(AndroidTags.AndroidActivity);
302303

@@ -387,6 +388,9 @@ private void displayWidgetInfo(Widget nodeWidget) {
387388
infoPaneLeft.add(new JLabel("Selected: ")).setFont(new Font("SansSerif", Font.BOLD, fontSize));
388389
infoPaneRight.add(new JLabel(String.valueOf(selectedWidget))).setFont(new Font("SansSerif", Font.PLAIN, fontSize));
389390

391+
infoPaneLeft.add(new JLabel("Displayed: ")).setFont(new Font("SansSerif", Font.BOLD, fontSize));
392+
infoPaneRight.add(new JLabel(String.valueOf(selectedWidget))).setFont(new Font("SansSerif", Font.PLAIN, fontSize));
393+
390394
infoPaneLeft.add(new JLabel("Current Activity: ")).setFont(new Font("SansSerif", Font.BOLD, fontSize));
391395
infoPaneRight.add(new JLabel(String.valueOf(activityWidget))).setFont(new Font("SansSerif", Font.PLAIN, fontSize));
392396

0 commit comments

Comments
 (0)