honeydew 0.12.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/.rspec +1 -1
  2. data/LICENSE.txt +1 -1
  3. data/README.md +79 -8
  4. data/Rakefile +2 -2
  5. data/examples/cucumber/Gemfile +5 -0
  6. data/{example → examples/cucumber}/Rakefile +0 -0
  7. data/{example → examples/cucumber}/features/example.feature +0 -0
  8. data/{example → examples/cucumber}/features/step_definitions/honeydew_steps.rb +0 -0
  9. data/examples/rspec/spec/browse_spec.rb +16 -0
  10. data/examples/rspec/spec/spec_helper.rb +6 -0
  11. data/honeydew.gemspec +17 -17
  12. data/honeydew.iml +12 -18
  13. data/lib/honeydew.rb +1 -72
  14. data/lib/honeydew/device.rb +79 -44
  15. data/lib/honeydew/device_actions.rb +32 -100
  16. data/lib/honeydew/device_commands.rb +36 -23
  17. data/lib/honeydew/device_matchers.rb +29 -22
  18. data/lib/honeydew/dsl.rb +1 -1
  19. data/lib/honeydew/honeydew.rb +82 -0
  20. data/lib/honeydew/version.rb +1 -1
  21. data/{android-server → server}/.gitignore +0 -0
  22. data/{android-server → server}/pom.xml +16 -6
  23. data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/_maven.repositories +0 -0
  24. data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.jar +0 -0
  25. data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.pom +0 -0
  26. data/{android-server → server}/repo/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.5.2-SNAPSHOT/android-maven-plugin-3.5.2-SNAPSHOT.jar +0 -0
  27. data/{android-server → server}/repo/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.5.2-SNAPSHOT/android-maven-plugin-3.5.2-SNAPSHOT.pom +0 -0
  28. data/{android-server → server}/repo/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.5.2-SNAPSHOT/maven-metadata-local.xml +0 -0
  29. data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/_maven.repositories +0 -0
  30. data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/commons-jxpath-1.4-SNAPSHOT.jar +0 -0
  31. data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/commons-jxpath-1.4-SNAPSHOT.pom +0 -0
  32. data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/maven-metadata-local.xml +0 -0
  33. data/{android-server → server}/repo/commons-jxpath/commons-jxpath/maven-metadata-local.xml +0 -0
  34. data/server/repo/fi/iki/elonen/nanohttpd-webserver/2.0.3/nanohttpd-webserver-2.0.3.jar +0 -0
  35. data/server/repo/fi/iki/elonen/nanohttpd-webserver/2.0.3/nanohttpd-webserver-2.0.3.pom +9 -0
  36. data/server/repo/fi/iki/elonen/nanohttpd-webserver/maven-metadata-local.xml +12 -0
  37. data/server/repo/fi/iki/elonen/nanohttpd/2.0.3/nanohttpd-2.0.3.jar +0 -0
  38. data/server/repo/fi/iki/elonen/nanohttpd/2.0.3/nanohttpd-2.0.3.pom +9 -0
  39. data/server/repo/fi/iki/elonen/nanohttpd/maven-metadata-local.xml +12 -0
  40. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/Action.java +13 -6
  41. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/ActionsExecutor.java +3 -2
  42. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/Command.java +6 -1
  43. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/Result.java +7 -7
  44. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/TestRunner.java +14 -6
  45. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/Click.java +3 -3
  46. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/ClickAndWaitForNewWindow.java +3 -3
  47. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/DumpWindowHierarchy.java +5 -5
  48. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/HasSettingsMenuItem.java +4 -5
  49. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/InspectOptionInSettingsMenu.java +3 -3
  50. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/IsButtonPresent.java +3 -3
  51. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/IsChildCountEqualTo.java +4 -4
  52. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/IsElementWithNestedTextPresent.java +3 -3
  53. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/IsOptionInSettingsMenuDisabled.java +1 -1
  54. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/IsOptionInSettingsMenuEnabled.java +1 -1
  55. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/IsTextPresent.java +3 -3
  56. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/LaunchApp.java +3 -3
  57. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/LaunchHome.java +3 -3
  58. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/LongClick.java +3 -3
  59. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/PressBack.java +3 -3
  60. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/PressEnter.java +4 -4
  61. data/server/src/main/java/com/amplify/honeydew_server/actions/ScrollToTextByIndex.java +27 -0
  62. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/SelectFromAppsList.java +4 -4
  63. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/SelectMenuInSettings.java +3 -3
  64. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/SetText.java +3 -3
  65. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/SetTextByIndex.java +2 -2
  66. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/SetTextByLabel.java +3 -3
  67. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/Unlock.java +3 -3
  68. data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew_server}/actions/WakeUp.java +4 -4
  69. data/server/src/main/java/com/amplify/honeydew_server/httpd/RemoteCommandReceiver.java +66 -0
  70. data/spec/honeydew/device_matchers_spec.rb +21 -42
  71. data/spec/honeydew/device_spec.rb +38 -36
  72. data/spec/spec_helper.rb +2 -25
  73. metadata +93 -92
  74. data/android-server/src/main/java/com/uiautomator_cucumber/android_server/httpd/NanoHTTPD.java +0 -1100
  75. data/android-server/src/main/java/com/uiautomator_cucumber/android_server/httpd/RemoteCommandReceiver.java +0 -64
  76. data/example/Gemfile +0 -5
  77. data/example/features/support/hooks.rb +0 -4
  78. data/lib/honeydew/hooks.rb +0 -0
  79. data/lib/honeydew/step_definitions.rb +0 -75
  80. data/lib/tasks/honeydew.rake +0 -7
  81. data/todo.md +0 -9
@@ -1,3 +1,3 @@
1
1
  module Honeydew
2
- VERSION = "0.12.0"
2
+ VERSION = '0.14.0'
3
3
  end
File without changes
@@ -3,11 +3,11 @@
3
3
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
 
6
- <groupId>uiautomator-cucumber</groupId>
7
- <artifactId>android-server</artifactId>
8
- <version>0.0.1-SNAPSHOT</version>
6
+ <groupId>amplify</groupId>
7
+ <artifactId>honeydew-server</artifactId>
8
+ <version>0.14.0</version>
9
9
  <packaging>jar</packaging>
10
- <name>UIAutomator Cucumber - Android Server</name>
10
+ <name>Honeydew Android Server</name>
11
11
 
12
12
  <properties>
13
13
  <platform.version>4.1.1.4</platform.version>
@@ -31,7 +31,7 @@
31
31
 
32
32
  <dependencies>
33
33
  <dependency>
34
- <groupId>com.google.android</groupId>
34
+ <groupId>com.google.android</groupId>
35
35
  <artifactId>android</artifactId>
36
36
  <version>${platform.version}</version>
37
37
  <scope>provided</scope>
@@ -68,6 +68,16 @@
68
68
  <artifactId>commons-io</artifactId>
69
69
  <version>2.4</version>
70
70
  </dependency>
71
+ <dependency>
72
+ <groupId>fi.iki.elonen</groupId>
73
+ <artifactId>nanohttpd</artifactId>
74
+ <version>2.0.3</version>
75
+ </dependency>
76
+ <dependency>
77
+ <groupId>fi.iki.elonen</groupId>
78
+ <artifactId>nanohttpd-webserver</artifactId>
79
+ <version>2.0.3</version>
80
+ </dependency>
71
81
  </dependencies>
72
82
 
73
83
  <build>
@@ -105,7 +115,7 @@
105
115
  <skip>false</skip>
106
116
  <testClassOrMethods>
107
117
  <testClassOrMethod>
108
- com.uiautomator_cucumber.android_server.TestRunner
118
+ com.amplify.honeydew_server.TestRunner
109
119
  </testClassOrMethod>
110
120
  </testClassOrMethods>
111
121
  <createReport>true</createReport>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4
+ <modelVersion>4.0.0</modelVersion>
5
+ <groupId>fi.iki.elonen</groupId>
6
+ <artifactId>nanohttpd-webserver</artifactId>
7
+ <version>2.0.3</version>
8
+ <description>POM was created from install:install-file</description>
9
+ </project>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <metadata>
3
+ <groupId>fi.iki.elonen</groupId>
4
+ <artifactId>nanohttpd-webserver</artifactId>
5
+ <versioning>
6
+ <release>2.0.3</release>
7
+ <versions>
8
+ <version>2.0.3</version>
9
+ </versions>
10
+ <lastUpdated>20130709205330</lastUpdated>
11
+ </versioning>
12
+ </metadata>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4
+ <modelVersion>4.0.0</modelVersion>
5
+ <groupId>fi.iki.elonen</groupId>
6
+ <artifactId>nanohttpd</artifactId>
7
+ <version>2.0.3</version>
8
+ <description>POM was created from install:install-file</description>
9
+ </project>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <metadata>
3
+ <groupId>fi.iki.elonen</groupId>
4
+ <artifactId>nanohttpd</artifactId>
5
+ <versioning>
6
+ <release>2.0.3</release>
7
+ <versions>
8
+ <version>2.0.3</version>
9
+ </versions>
10
+ <lastUpdated>20130709205249</lastUpdated>
11
+ </versioning>
12
+ </metadata>
@@ -1,9 +1,7 @@
1
- package com.uiautomator_cucumber.android_server;
1
+ package com.amplify.honeydew_server;
2
2
 
3
- import com.android.uiautomator.core.UiDevice;
4
- import com.android.uiautomator.core.UiObject;
5
- import com.android.uiautomator.core.UiObjectNotFoundException;
6
- import com.android.uiautomator.core.UiSelector;
3
+ import android.util.Log;
4
+ import com.android.uiautomator.core.*;
7
5
  import com.google.common.base.CaseFormat;
8
6
 
9
7
  import java.util.Map;
@@ -26,18 +24,27 @@ public abstract class Action {
26
24
  }
27
25
 
28
26
  protected UiObject getUiObject(Map<String, Object> arguments) {
27
+ ViewSelector viewSelector = getViewSelector(arguments);
28
+ return viewSelector.find();
29
+ }
30
+
31
+ protected ViewSelector getViewSelector(Map<String, Object> arguments) {
29
32
  ViewSelector viewSelector = new ViewSelector();
30
33
 
34
+ Log.d(getClass().getName(), arguments.toString());
31
35
  if (arguments.containsKey("type")) {
36
+ Log.d(getClass().getName(), String.format("Type %s", (String) arguments.get("type")));
32
37
  viewSelector.withType((String) arguments.get("type"));
33
38
  }
34
39
  if (arguments.containsKey("text")) {
40
+ Log.d(getClass().getName(), String.format("Text %s", (String) arguments.get("text")));
35
41
  viewSelector.withText((String) arguments.get("text"));
36
42
  }
37
43
  if (arguments.containsKey("description")) {
44
+ Log.d(getClass().getName(), String.format("Description %s", (String) arguments.get("description")));
38
45
  viewSelector.withDescription((String) arguments.get("description"));
39
46
  }
40
- return viewSelector.find();
47
+ return viewSelector;
41
48
  }
42
49
 
43
50
  public static class ViewSelector {
@@ -1,8 +1,8 @@
1
- package com.uiautomator_cucumber.android_server;
1
+ package com.amplify.honeydew_server;
2
2
 
3
3
  import android.util.Log;
4
4
  import com.android.uiautomator.core.UiDevice;
5
- import com.uiautomator_cucumber.android_server.actions.*;
5
+ import com.amplify.honeydew_server.actions.*;
6
6
 
7
7
  import java.lang.reflect.Constructor;
8
8
  import java.lang.reflect.InvocationTargetException;
@@ -64,6 +64,7 @@ public class ActionsExecutor {
64
64
  actionClasses.add(HasSettingsMenuItem.class);
65
65
  actionClasses.add(SelectFromAppsList.class);
66
66
  actionClasses.add(Unlock.class);
67
+ actionClasses.add(ScrollToTextByIndex.class);
67
68
  return actionClasses;
68
69
  }
69
70
 
@@ -1,4 +1,4 @@
1
- package com.uiautomator_cucumber.android_server;
1
+ package com.amplify.honeydew_server;
2
2
 
3
3
  import java.util.Map;
4
4
 
@@ -6,6 +6,11 @@ public class Command {
6
6
  private String action;
7
7
  private Map<String, Object> arguments;
8
8
 
9
+ public Command(String action, Map<String, Object> arguments) {
10
+ this.action = action;
11
+ this.arguments = arguments;
12
+ }
13
+
9
14
  public String getAction() {
10
15
  return action;
11
16
  }
@@ -1,22 +1,22 @@
1
- package com.uiautomator_cucumber.android_server;
1
+ package com.amplify.honeydew_server;
2
2
 
3
3
  import org.apache.commons.lang.exception.ExceptionUtils;
4
4
 
5
5
  public class Result {
6
- private final boolean success;
7
- private String description;
8
- private String errorMessage;
9
- private String stackTrace;
6
+ public final boolean success;
7
+ public String description;
8
+ public String errorMessage;
9
+ public String stackTrace;
10
10
 
11
11
  public static Result OK = new Result();
12
12
  public static Result FAILURE = new Result(false);
13
13
 
14
14
  public Result() {
15
- this.success = true;
15
+ this(true);
16
16
  }
17
17
 
18
18
  public Result(boolean success) {
19
- this.success = success;
19
+ this(success, success ? "Success!" : "Failure.");
20
20
  }
21
21
 
22
22
  public Result(boolean success, String description) {
@@ -1,20 +1,28 @@
1
- package com.uiautomator_cucumber.android_server;
1
+ package com.amplify.honeydew_server;
2
2
 
3
+ import android.util.Log;
3
4
  import android.view.KeyEvent;
4
5
  import com.android.uiautomator.core.UiDevice;
5
6
  import com.android.uiautomator.testrunner.UiAutomatorTestCase;
6
- import com.uiautomator_cucumber.android_server.httpd.RemoteCommandReceiver;
7
+ import com.amplify.honeydew_server.httpd.RemoteCommandReceiver;
8
+ import fi.iki.elonen.ServerRunner;
7
9
 
8
10
  public class TestRunner extends UiAutomatorTestCase {
9
11
 
10
- public static final String TAG = "UIAutomatorRemote";
11
-
12
12
  public void testRemoteLoop() throws Exception {
13
+ Log.d(getClass().getName(), "Starting honeydew-server...");
14
+
13
15
  UiDevice uiDevice = getUiDevice();
14
16
  uiDevice.wakeUp();
15
17
  unlockEmulator();
16
18
 
17
- new RemoteCommandReceiver(new ActionsExecutor(uiDevice));
19
+ RemoteCommandReceiver remoteCommandReceiver = new RemoteCommandReceiver(new ActionsExecutor(uiDevice));
20
+ ServerRunner.executeInstance(remoteCommandReceiver);
21
+
22
+ Log.d(getClass().getName(), "honeydew-server started, waiting for commands");
23
+ while(true) {
24
+ Thread.sleep(1000);
25
+ }
18
26
  }
19
27
 
20
28
  private void unlockEmulator() {
@@ -23,4 +31,4 @@ public class TestRunner extends UiAutomatorTestCase {
23
31
  getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
24
32
  getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
25
33
  }
26
- }
34
+ }
@@ -1,9 +1,9 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
+ import com.amplify.honeydew_server.Action;
4
+ import com.amplify.honeydew_server.Result;
3
5
  import com.android.uiautomator.core.UiDevice;
4
6
  import com.android.uiautomator.core.UiObjectNotFoundException;
5
- import com.uiautomator_cucumber.android_server.Action;
6
- import com.uiautomator_cucumber.android_server.Result;
7
7
 
8
8
  import java.util.Map;
9
9
 
@@ -1,9 +1,9 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import com.android.uiautomator.core.UiDevice;
4
4
  import com.android.uiautomator.core.UiObjectNotFoundException;
5
- import com.uiautomator_cucumber.android_server.Action;
6
- import com.uiautomator_cucumber.android_server.Result;
5
+ import com.amplify.honeydew_server.Action;
6
+ import com.amplify.honeydew_server.Result;
7
7
 
8
8
  import java.util.Map;
9
9
 
@@ -1,9 +1,9 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import com.android.uiautomator.core.UiDevice;
4
4
  import com.android.uiautomator.core.UiObjectNotFoundException;
5
- import com.uiautomator_cucumber.android_server.Action;
6
- import com.uiautomator_cucumber.android_server.Result;
5
+ import com.amplify.honeydew_server.Action;
6
+ import com.amplify.honeydew_server.Result;
7
7
  import org.apache.commons.io.FileUtils;
8
8
 
9
9
  import java.io.File;
@@ -22,7 +22,7 @@ public class DumpWindowHierarchy extends Action {
22
22
  } catch (IOException e) {
23
23
  return new Result("Create directory failed", e);
24
24
  }
25
- uiDevice.dumpWindowHierarchy("honeydew-window-hierarchy");
26
- return new Result(true, "/data/local/tmp/local/tmp/honeydew-window-hierarchy");
25
+ uiDevice.dumpWindowHierarchy("honeydew_server-window-hierarchy");
26
+ return new Result(true, "/data/local/tmp/local/tmp/honeydew_server-window-hierarchy");
27
27
  }
28
28
  }
@@ -1,11 +1,10 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import android.widget.TextView;
4
4
  import com.android.uiautomator.core.*;
5
- import com.uiautomator_cucumber.android_server.Action;
6
- import com.uiautomator_cucumber.android_server.Result;
5
+ import com.amplify.honeydew_server.Action;
6
+ import com.amplify.honeydew_server.Result;
7
7
 
8
- import java.util.List;
9
8
  import java.util.Map;
10
9
 
11
10
  public class HasSettingsMenuItem extends Action {
@@ -20,4 +19,4 @@ public class HasSettingsMenuItem extends Action {
20
19
  UiObject menuItem = settingsMenu.getChildByText(new UiSelector().className(TextView.class.getName()), menuName);
21
20
  return menuItem.exists() ? Result.OK : Result.FAILURE;
22
21
  }
23
- }
22
+ }
@@ -1,8 +1,8 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import android.widget.TextView;
4
4
  import com.android.uiautomator.core.*;
5
- import com.uiautomator_cucumber.android_server.Result;
5
+ import com.amplify.honeydew_server.Result;
6
6
 
7
7
  import java.util.List;
8
8
  import java.util.Map;
@@ -18,7 +18,7 @@ public abstract class InspectOptionInSettingsMenu extends SelectMenuInSettings {
18
18
  @Override
19
19
  public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException {
20
20
  super.execute(arguments);
21
- List<String> optionNames = (List<String>) arguments.get("optionNames");
21
+ List<String> optionNames = (List<String>)arguments.get("optionNames");
22
22
  UiScrollable optionsMenu = new UiScrollable(new UiSelector().className("android.widget.ListView").packageName("com.android.settings").focused(false));
23
23
 
24
24
  for (String optionName : optionNames) {
@@ -1,11 +1,11 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import com.android.uiautomator.core.UiDevice;
4
4
  import com.android.uiautomator.core.UiObject;
5
5
  import com.android.uiautomator.core.UiObjectNotFoundException;
6
6
  import com.android.uiautomator.core.UiSelector;
7
- import com.uiautomator_cucumber.android_server.Action;
8
- import com.uiautomator_cucumber.android_server.Result;
7
+ import com.amplify.honeydew_server.Action;
8
+ import com.amplify.honeydew_server.Result;
9
9
 
10
10
  import java.util.Map;
11
11
 
@@ -1,8 +1,8 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import com.android.uiautomator.core.*;
4
- import com.uiautomator_cucumber.android_server.Action;
5
- import com.uiautomator_cucumber.android_server.Result;
4
+ import com.amplify.honeydew_server.Action;
5
+ import com.amplify.honeydew_server.Result;
6
6
 
7
7
  import java.util.Map;
8
8
 
@@ -16,7 +16,7 @@ public class IsChildCountEqualTo extends Action {
16
16
  public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException {
17
17
  String parentDescription = (String) arguments.get("parent_description");
18
18
  String childDescription = (String) arguments.get("child_description");
19
- int childCount = ((Double)arguments.get("child_count")).intValue();
19
+ int childCount = (Integer) arguments.get("child_count");
20
20
 
21
21
  UiCollection parentElement = new UiCollection(new UiSelector().description(parentDescription));
22
22
  int count = parentElement.getChildCount(new UiSelector().description(childDescription));
@@ -1,8 +1,8 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import com.android.uiautomator.core.*;
4
- import com.uiautomator_cucumber.android_server.Action;
5
- import com.uiautomator_cucumber.android_server.Result;
4
+ import com.amplify.honeydew_server.Action;
5
+ import com.amplify.honeydew_server.Result;
6
6
 
7
7
  import java.util.Map;
8
8
 
@@ -1,4 +1,4 @@
1
- package com.uiautomator_cucumber.android_server.actions;
1
+ package com.amplify.honeydew_server.actions;
2
2
 
3
3
  import com.android.uiautomator.core.UiDevice;
4
4