-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improved the overall speed of interactions (tap, swipe, input text, key events) by going through the server instead of adb * Dependency handling "InstallIfMissing" now also check if the installed package version is outdated. * New method in ActivityService to check for package version * Improved logging when dumping UI.
- Loading branch information
Showing
15 changed files
with
292 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-19 KB
(98%)
src/Testura.Android/Dependencies/Testura.Android.Server-UiAutomator.apk
Binary file not shown.
Binary file modified
BIN
+28 Bytes
(100%)
src/Testura.Android/Dependencies/Testura.Android.Server.apk
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/Testura.Android/Device/Ui/Server/IInteractionUiAutomatorServer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using Testura.Android.Util; | ||
|
||
namespace Testura.Android.Device.Ui.Server | ||
{ | ||
/// <summary> | ||
/// Defines methods to send interaction requests to the ui automator server. | ||
/// </summary> | ||
public interface IInteractionUiAutomatorServer | ||
{ | ||
/// <summary> | ||
/// Send a tap request to the ui automator server on the android device. | ||
/// </summary> | ||
/// <param name="x">The x coordinate</param> | ||
/// <param name="y">The y coordinate</param> | ||
/// <returns>True if we successfully tapped, otherwise false.</returns> | ||
bool Tap(int x, int y); | ||
|
||
/// <summary> | ||
/// Send a swipe request to the ui automator server on the android device. | ||
/// </summary> | ||
/// <param name="fromX">Swipe from this x coordinate</param> | ||
/// <param name="fromY">Swipe from this y coordinate</param> | ||
/// <param name="toX">Swipe to this x coordinate</param> | ||
/// <param name="toY">Swipe to this y coordinate</param> | ||
/// <param name="duration">Swipe duration in miliseconds</param> | ||
/// <returns>True if we successfully swiped, otherwise false.</returns> | ||
bool Swipe(int fromX, int fromY, int toX, int toY, int duration); | ||
|
||
/// <summary> | ||
/// Send a key event request to the ui automator server on the android device. | ||
/// </summary> | ||
/// <param name="keyEvent">Key event to send to the device</param> | ||
/// <returns>True if we successfully input key event, otherwise false.</returns> | ||
bool InputKeyEvent(KeyEvents keyEvent); | ||
|
||
/// <summary> | ||
/// Send a input text request to the ui automator server on the android device. | ||
/// </summary> | ||
/// <param name="text">Text to send</param> | ||
/// <returns>True if we successfully input text, otherwise false.</returns> | ||
bool InputText(string text); | ||
} | ||
} |
Oops, something went wrong.