Skip to content

Commit 806c70e

Browse files
committed
Update android action desc and policies
1 parent dc7eb05 commit 806c70e

5 files changed

Lines changed: 13 additions & 8 deletions

File tree

android/src/org/testar/android/action/AndroidActionDescriptions.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ private static String describeWidgetTarget(Widget widget) {
4646
return "resource-id '" + resourceId + "'";
4747
}
4848

49+
String hint = trim(widget.get(AndroidTags.AndroidHint, ""));
50+
if (!hint.isEmpty()) {
51+
return "hint '" + hint + "'";
52+
}
53+
4954
String xpath = trim(widget.get(AndroidTags.AndroidXpath, ""));
5055
if (!xpath.isEmpty()) {
5156
return "xpath '" + xpath + "'";

android/src/org/testar/android/action/policy/AndroidClickablePolicy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public boolean isClickable(Widget widget) {
3737
return false;
3838
}
3939

40-
return widget.get(AndroidTags.AndroidClickable, false)
41-
&& widget.get(AndroidTags.AndroidEnabled, false)
42-
&& widget.get(AndroidTags.AndroidDisplayed, false);
40+
return widget.get(AndroidTags.AndroidClickable, true)
41+
&& widget.get(AndroidTags.AndroidEnabled, true)
42+
&& widget.get(AndroidTags.AndroidDisplayed, true);
4343
}
4444
}

android/src/org/testar/android/action/policy/AndroidTypeablePolicy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public boolean isTypeable(Widget widget) {
3737
return false;
3838
}
3939

40-
return widget.get(AndroidTags.AndroidEnabled, false)
41-
&& widget.get(AndroidTags.AndroidFocusable, false)
42-
&& widget.get(AndroidTags.AndroidDisplayed, false);
40+
return widget.get(AndroidTags.AndroidEnabled, true)
41+
&& widget.get(AndroidTags.AndroidFocusable, true)
42+
&& widget.get(AndroidTags.AndroidDisplayed, true);
4343
}
4444
}

android/src/org/testar/android/state/AndroidStateFetcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private void XmlNodeDescend(AndroidElement parent, Node xmlNode) {
118118
childElement.zindex = parent.zindex + 1;
119119
childElement.enabled = AndroidNodeParser.getBooleanAttribute(xmlNode, "enabled");
120120
childElement.ignore = false;
121-
childElement.blocked = AndroidNodeParser.getBooleanAttribute(xmlNode, "focusable");
121+
childElement.blocked = false;
122122

123123
childElement.nodeIndex = AndroidNodeParser.getIntegerAttribute(xmlNode, "index");
124124
childElement.text = AndroidNodeParser.getStringAttribute(xmlNode, "text");

cli/resources/settings/cli.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ AppiumIpAddress =
120120
AppiumDeviceName = Android Emulator
121121
AppiumAutomationName = UiAutomator2
122122
AppiumNewCommandTimeout = 600
123-
AppiumAutoGrantPermissions = false
123+
AppiumAutoGrantPermissions = true
124124
AppiumAllowInvisibleElements = false
125125
AppiumIgnoreHiddenApiPolicyError = false
126126
AppiumAdbExecTimeout = 120000

0 commit comments

Comments
 (0)