-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fingerprint endpoint and toggle data endpoints (#324)
- Loading branch information
Showing
6 changed files
with
88 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ packages | |
.idea | ||
.vs/ | ||
env.json | ||
|
||
.vscode/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Text.RegularExpressions; | ||
using Appium.Net.Integration.Tests.helpers; | ||
using NUnit.Framework; | ||
using OpenQA.Selenium; | ||
using OpenQA.Selenium.Appium.Android; | ||
using OpenQA.Selenium.Appium.Enums; | ||
|
||
namespace Appium.Net.Integration.Tests.Android | ||
{ | ||
[TestFixture(Category = "Device")] | ||
public class DeviceTest | ||
{ | ||
private AndroidDriver<IWebElement> _driver; | ||
private const string ClipboardTestString = "Hello Clipboard"; | ||
private const string Base64RegexPattern = @"^[a-zA-Z0-9\+/]*={0,2}$"; | ||
|
||
[OneTimeSetUp] | ||
public void BeforeAll() | ||
{ | ||
var capabilities = Caps.GetAndroidCaps(Apps.Get("androidApiDemos")); | ||
capabilities.AddAdditionalCapability(MobileCapabilityType.FullReset, true); | ||
var serverUri = Env.ServerIsRemote() ? AppiumServers.RemoteServerUri : AppiumServers.LocalServiceUri; | ||
_driver = new AndroidDriver<IWebElement>(serverUri, capabilities, Env.InitTimeoutSec); | ||
_driver.Manage().Timeouts().ImplicitWait = Env.ImplicitTimeoutSec; | ||
} | ||
|
||
[SetUp] | ||
public void SetUp() | ||
{ | ||
_driver?.LaunchApp(); | ||
} | ||
|
||
[TearDown] | ||
public void TearDown() | ||
{ | ||
_driver?.CloseApp(); | ||
} | ||
|
||
[Test] | ||
public void TestSendFingerprint() | ||
{ | ||
// There's no way to verify sending fingerprint had an effect, | ||
// so just test that it's successfully called without an exception | ||
_driver.FingerPrint(1); | ||
} | ||
|
||
[Test] | ||
public void TestToggleData() | ||
{ | ||
_driver.ToggleData(); | ||
_driver.ToggleData(); | ||
} | ||
} | ||
} |