honeydew 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -4
- data/Rakefile +2 -2
- data/{server → android-server}/.gitignore +0 -0
- data/{server → android-server}/pom.xml +5 -5
- data/{server → android-server}/repo/com/google/android/uiautomator/4.1.1.4/_maven.repositories +0 -0
- data/{server → android-server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.jar +0 -0
- data/{server → android-server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.pom +0 -0
- data/{server → android-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
- data/{server → android-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
- data/{server → android-server}/repo/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.5.2-SNAPSHOT/maven-metadata-local.xml +0 -0
- data/{server → android-server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/_maven.repositories +0 -0
- data/{server → android-server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/commons-jxpath-1.4-SNAPSHOT.jar +0 -0
- data/{server → android-server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/commons-jxpath-1.4-SNAPSHOT.pom +0 -0
- data/{server → android-server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/maven-metadata-local.xml +0 -0
- data/{server → android-server}/repo/commons-jxpath/commons-jxpath/maven-metadata-local.xml +0 -0
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/Action.java +1 -1
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/ActionsExecutor.java +2 -2
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/Command.java +1 -1
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/Result.java +1 -1
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/TestRunner.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/Click.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/ClickAndWaitForNewWindow.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/DumpWindowHierarchy.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/HasSettingsMenuItem.java +4 -4
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/InspectOptionInSettingsMenu.java +2 -2
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/IsButtonPresent.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/IsChildCountEqualTo.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/IsElementWithNestedTextPresent.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/IsOptionInSettingsMenuDisabled.java +1 -1
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/IsOptionInSettingsMenuEnabled.java +1 -1
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/IsTextPresent.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/LaunchApp.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/LaunchHome.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/LongClick.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/PressBack.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/PressEnter.java +4 -4
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/SelectFromAppsList.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/SelectMenuInSettings.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/SetText.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/SetTextByIndex.java +2 -2
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/SetTextByLabel.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/Unlock.java +3 -3
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/actions/WakeUp.java +4 -4
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/httpd/NanoHTTPD.java +2 -2
- data/{server/src/main/java/com/amplify/honeydew → android-server/src/main/java/com/uiautomator_cucumber/android_server}/httpd/RemoteCommandReceiver.java +5 -5
- data/example/Gemfile +3 -3
- data/honeydew.gemspec +6 -7
- data/lib/honeydew/device.rb +12 -3
- data/lib/honeydew/device_actions.rb +62 -61
- data/lib/honeydew/device_commands.rb +3 -3
- data/lib/honeydew/device_matchers.rb +14 -36
- data/lib/honeydew/hooks.rb +0 -0
- data/lib/honeydew/step_definitions.rb +75 -0
- data/lib/honeydew/version.rb +1 -1
- data/lib/honeydew.rb +2 -2
- data/lib/tasks/honeydew.rake +7 -0
- data/spec/honeydew/device_matchers_spec.rb +42 -21
- data/spec/honeydew/device_spec.rb +35 -37
- metadata +68 -57
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ task :build_android_server do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def android_server_path
|
14
|
-
File.absolute_path(File.join(File.dirname(__FILE__), 'server'))
|
14
|
+
File.absolute_path(File.join(File.dirname(__FILE__), 'android-server'))
|
15
15
|
end
|
16
16
|
|
17
|
-
task :build => [:spec, :build_android_server]
|
17
|
+
task :build => [:spec, :build_android_server]
|
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>
|
7
|
-
<artifactId>
|
8
|
-
<version>0.
|
6
|
+
<groupId>uiautomator-cucumber</groupId>
|
7
|
+
<artifactId>android-server</artifactId>
|
8
|
+
<version>0.0.1-SNAPSHOT</version>
|
9
9
|
<packaging>jar</packaging>
|
10
|
-
<name>
|
10
|
+
<name>UIAutomator Cucumber - Android Server</name>
|
11
11
|
|
12
12
|
<properties>
|
13
13
|
<platform.version>4.1.1.4</platform.version>
|
@@ -105,7 +105,7 @@
|
|
105
105
|
<skip>false</skip>
|
106
106
|
<testClassOrMethods>
|
107
107
|
<testClassOrMethod>
|
108
|
-
com.
|
108
|
+
com.uiautomator_cucumber.android_server.TestRunner
|
109
109
|
</testClassOrMethod>
|
110
110
|
</testClassOrMethods>
|
111
111
|
<createReport>true</createReport>
|
data/{server → android-server}/repo/com/google/android/uiautomator/4.1.1.4/_maven.repositories
RENAMED
File without changes
|
data/{server → android-server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.jar
RENAMED
File without changes
|
data/{server → android-server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.pom
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{server → android-server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/_maven.repositories
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server;
|
2
2
|
|
3
3
|
import android.util.Log;
|
4
4
|
import com.android.uiautomator.core.UiDevice;
|
5
|
-
import com.
|
5
|
+
import com.uiautomator_cucumber.android_server.actions.*;
|
6
6
|
|
7
7
|
import java.lang.reflect.Constructor;
|
8
8
|
import java.lang.reflect.InvocationTargetException;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server;
|
2
2
|
|
3
3
|
import android.view.KeyEvent;
|
4
4
|
import com.android.uiautomator.core.UiDevice;
|
5
5
|
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
|
6
|
-
import com.
|
6
|
+
import com.uiautomator_cucumber.android_server.httpd.RemoteCommandReceiver;
|
7
7
|
|
8
8
|
public class TestRunner extends UiAutomatorTestCase {
|
9
9
|
|
@@ -23,4 +23,4 @@ public class TestRunner extends UiAutomatorTestCase {
|
|
23
23
|
getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
|
24
24
|
getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
|
25
25
|
}
|
26
|
-
}
|
26
|
+
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
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.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
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.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.uiautomator_cucumber.android_server.Action;
|
6
|
+
import com.uiautomator_cucumber.android_server.Result;
|
7
7
|
import org.apache.commons.io.FileUtils;
|
8
8
|
|
9
9
|
import java.io.File;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import android.widget.TextView;
|
4
4
|
import com.android.uiautomator.core.*;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.uiautomator_cucumber.android_server.Action;
|
6
|
+
import com.uiautomator_cucumber.android_server.Result;
|
7
7
|
|
8
8
|
import java.util.List;
|
9
9
|
import java.util.Map;
|
@@ -20,4 +20,4 @@ public class HasSettingsMenuItem extends Action {
|
|
20
20
|
UiObject menuItem = settingsMenu.getChildByText(new UiSelector().className(TextView.class.getName()), menuName);
|
21
21
|
return menuItem.exists() ? Result.OK : Result.FAILURE;
|
22
22
|
}
|
23
|
-
}
|
23
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import android.widget.TextView;
|
4
4
|
import com.android.uiautomator.core.*;
|
5
|
-
import com.
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.List;
|
8
8
|
import java.util.Map;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_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.
|
8
|
-
import com.
|
7
|
+
import com.uiautomator_cucumber.android_server.Action;
|
8
|
+
import com.uiautomator_cucumber.android_server.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
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,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
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,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -16,4 +16,4 @@ public class PressEnter extends Action {
|
|
16
16
|
getUiDevice().pressEnter();
|
17
17
|
return Result.OK;
|
18
18
|
}
|
19
|
-
}
|
19
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_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.
|
8
|
-
import com.
|
7
|
+
import com.uiautomator_cucumber.android_server.Action;
|
8
|
+
import com.uiautomator_cucumber.android_server.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import android.util.*;
|
4
4
|
import com.android.uiautomator.core.*;
|
5
|
-
import com.
|
5
|
+
import com.uiautomator_cucumber.android_server.*;
|
6
6
|
|
7
7
|
import java.util.*;
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_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.
|
8
|
-
import com.
|
7
|
+
import com.uiautomator_cucumber.android_server.Action;
|
8
|
+
import com.uiautomator_cucumber.android_server.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_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.
|
8
|
-
import com.
|
7
|
+
import com.uiautomator_cucumber.android_server.Action;
|
8
|
+
import com.uiautomator_cucumber.android_server.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.uiautomator_cucumber.android_server.Action;
|
5
|
+
import com.uiautomator_cucumber.android_server.Result;
|
6
6
|
import android.os.RemoteException;
|
7
7
|
|
8
8
|
import java.util.Map;
|
@@ -21,4 +21,4 @@ public class WakeUp extends Action {
|
|
21
21
|
}
|
22
22
|
return Result.OK;
|
23
23
|
}
|
24
|
-
}
|
24
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.httpd;
|
2
2
|
|
3
3
|
import java.io.*;
|
4
4
|
import java.net.ServerSocket;
|
@@ -1097,4 +1097,4 @@ public class NanoHTTPD
|
|
1097
1097
|
"THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"+
|
1098
1098
|
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"+
|
1099
1099
|
"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
|
1100
|
-
}
|
1100
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
package com.
|
1
|
+
package com.uiautomator_cucumber.android_server.httpd;
|
2
2
|
|
3
3
|
import android.util.Log;
|
4
4
|
import com.google.gson.Gson;
|
5
|
-
import com.
|
6
|
-
import com.
|
7
|
-
import com.
|
5
|
+
import com.uiautomator_cucumber.android_server.ActionsExecutor;
|
6
|
+
import com.uiautomator_cucumber.android_server.Command;
|
7
|
+
import com.uiautomator_cucumber.android_server.Result;
|
8
8
|
|
9
9
|
import java.io.File;
|
10
10
|
import java.io.IOException;
|
@@ -61,4 +61,4 @@ public class RemoteCommandReceiver extends NanoHTTPD {
|
|
61
61
|
private void log(String uri, String method, Properties params) {
|
62
62
|
Log.d(TAG, String.format("Processing uri: %s, method: %s, params: %s", uri, method, params));
|
63
63
|
}
|
64
|
-
}
|
64
|
+
}
|
data/example/Gemfile
CHANGED
data/honeydew.gemspec
CHANGED
@@ -6,13 +6,11 @@ require 'honeydew/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "honeydew"
|
8
8
|
spec.version = Honeydew::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["scmp-team@amplify.com"
|
11
|
-
spec.
|
12
|
-
spec.
|
13
|
-
|
14
|
-
Android devices.
|
15
|
-
EOF
|
9
|
+
spec.authors = ["Selva", "Christopher Rex"]
|
10
|
+
spec.email = ["scmp-team@amplify.com"]
|
11
|
+
spec.description = %q{Automated functional testing on Android with uiautomator and cucumber}
|
12
|
+
spec.summary = %q{Automated functional testing on Android with uiautomator and cucumber}
|
13
|
+
spec.homepage = ""
|
16
14
|
|
17
15
|
spec.files = `git ls-files`.split($/) + Dir['android-server/target/*.jar']
|
18
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -23,6 +21,7 @@ Android devices.
|
|
23
21
|
spec.add_development_dependency "rake"
|
24
22
|
spec.add_development_dependency "rspec"
|
25
23
|
|
24
|
+
spec.add_dependency("cucumber")
|
26
25
|
spec.add_dependency("json")
|
27
26
|
spec.add_dependency("rest-client")
|
28
27
|
spec.add_dependency("activesupport")
|
data/lib/honeydew/device.rb
CHANGED
@@ -18,15 +18,24 @@ module Honeydew
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def contains_textview_text?(text, timeout = Honeydew.config.timeout)
|
21
|
-
has_textview_text? text, timeout
|
21
|
+
response = has_textview_text? text, timeout
|
22
|
+
response['success']
|
23
|
+
rescue
|
24
|
+
false
|
22
25
|
end
|
23
26
|
|
24
27
|
def contains_element_with_description?(description, timeout = Honeydew.config.timeout)
|
25
|
-
|
28
|
+
response = has_element_with_description? description, timeout
|
29
|
+
response['success']
|
30
|
+
rescue
|
31
|
+
false
|
26
32
|
end
|
27
33
|
|
28
34
|
def contains_button?(text, timeout = Honeydew.config.timeout)
|
29
|
-
has_button? text, timeout
|
35
|
+
response = has_button? text, timeout
|
36
|
+
response['success']
|
37
|
+
rescue
|
38
|
+
false
|
30
39
|
end
|
31
40
|
|
32
41
|
def is_app_installed?(package_name)
|