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
{ | |
"lambdatest_auth": { | |
"username": "<username>", | |
"access_key": "<access_key>" | |
}, | |
"browsers": [ | |
{ | |
"browser": "Chrome", | |
"platform": "Windows 10", | |
"versions": ["latest"] |
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
# Node.js | |
# Build a general Node.js project with npm. | |
# Add steps that analyze code, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript | |
trigger: | |
- master |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> | |
<suite name="Biometric authentication tests for Android using appium"> | |
<test name="WebDriverIO Android App Biometric Authentication Test"> | |
<parameter name="deviceType" value="local"/> | |
<classes> | |
<class name="io.github.mfaisalkhatri.tests.BiometricAuthTests"> | |
<methods> | |
<include name="testFingerPrintAuthenticationLogin"/> | |
</methods> |
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
public class LoginPage { | |
private final AndroidDriver androidDriver; | |
private final WebDriverWait wait; | |
public LoginPage(final AndroidDriver androidDriver) { | |
this.androidDriver = androidDriver; | |
this.wait = new WebDriverWait(androidDriver, Duration.ofSeconds(10)); | |
} |
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
public class MainPage { | |
private final AndroidDriver androidDriver; | |
public MainPage(final AndroidDriver androidDriver) { | |
this.androidDriver = androidDriver; | |
} | |
public void openMenu(final String menuName) { | |
this.androidDriver.findElement(AppiumBy.accessibilityId(menuName)).click(); |
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
public class BiometricAuthTests extends BaseTest { | |
@Test | |
public void testFingerPrintAuthenticationLogin() { | |
final MainPage mainPage = new MainPage(this.androidDriverManager.getAndroidDriver()); | |
final LoginPage loginPage = mainPage.openLoginPage(); | |
loginPage.performBioMetricLogin(1); |
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
public class BaseTest { | |
protected AndroidDriverManager androidDriverManager; | |
@Parameters({"deviceType"}) | |
@BeforeClass(alwaysRun = true) | |
public void setup(final String deviceType) { | |
this.androidDriverManager = new AndroidDriverManager(); | |
if (deviceType.equalsIgnoreCase("LOCAL")) { |
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
public void createAndroidDriver() { | |
try { | |
this.androidDriver = new AndroidDriver(new URL("http://127.0.0.1:4723/"), uiAutomator2Options()); | |
} catch (final MalformedURLException e) { | |
throw new Error("Error while setting up Android Driver", e); | |
} | |
setupDriverTimeouts(); | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> | |
<suite name="Biometric authentication tests for Android using appium"> | |
<test name="Instrumentation App Biometric Authentication Tests" > | |
<classes> | |
<class name="io.github.mfaisalkhatri.tests.BiometricAuthTests"> | |
<methods> | |
<include name="testSuccessfulBiometricAuthenticationUsingLambdaTest"/> | |
<include name="testFailedBiometricAuthenticationUsingLambdaTest"/> | |
</methods> |
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
public class HomePage { | |
private final AndroidDriver androidDriver; | |
public HomePage(final AndroidDriver androidDriver) { | |
this.androidDriver = androidDriver; | |
} | |
private WebElement biometricBtn() { | |
return this.androidDriver.findElement(AppiumBy.id("com.poc.sample:id/biometric")); |
NewerOlder