mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
Test script updated for new apk (#977)
Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com>
This commit is contained in:
committed by
GitHub
parent
e82599f396
commit
6e9fe5c685
@@ -0,0 +1,27 @@
|
||||
package io.mosip.test.mob.inji.pages;
|
||||
|
||||
import io.appium.java_client.AppiumDriver;
|
||||
import io.appium.java_client.pagefactory.AndroidFindBy;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
public class AddNewCardPage extends BasePage{
|
||||
|
||||
@AndroidFindBy(accessibility = "issuersScreenHeader")
|
||||
private WebElement addNewCardHeader;
|
||||
|
||||
@AndroidFindBy(accessibility = "issuerHeading-Mosip")
|
||||
private WebElement downloadViaUin;
|
||||
public AddNewCardPage(AppiumDriver driver) {
|
||||
super(driver);
|
||||
}
|
||||
|
||||
public boolean isAddNewCardPageLoaded() {
|
||||
return this.isElementDisplayed(addNewCardHeader, "Home page");
|
||||
}
|
||||
|
||||
public RetrieveIdPage clickOnDownloadViaUin(){
|
||||
clickOnElement(downloadViaUin);
|
||||
return new RetrieveIdPage(driver);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,11 +7,11 @@ import org.openqa.selenium.WebElement;
|
||||
|
||||
public class AppUnlockMethodPage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Select App Unlock Method')]")
|
||||
@AndroidFindBy(accessibility = "selectAppUnlockMethod")
|
||||
@iOSXCUITFindBy(accessibility = "Select App Unlock Method")
|
||||
private WebElement selectAppUnlockMethodText;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Use Passcode')]")
|
||||
@AndroidFindBy(accessibility = "usePasscode")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`label == \"Use Passcode\"`]")
|
||||
private WebElement usePasscodeButton;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.support.PageFactory;
|
||||
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
import io.mosip.test.mob.inji.utils.CommonMethods;
|
||||
|
||||
import static java.time.Duration.ofSeconds;
|
||||
|
||||
@@ -31,7 +30,7 @@ public class BasePage {
|
||||
ExtentLogger.pass(elementName + " is displayed");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
ExtentLogger.fail(elementName + " is not displayed");
|
||||
//ExtentLogger.fail(elementName + " is not displayed");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +41,7 @@ public class BasePage {
|
||||
ExtentLogger.pass(elementName + " is displayed");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
ExtentLogger.fail(elementName + " is not displayed");
|
||||
//ExtentLogger.fail(elementName + " is not displayed");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,16 +4,16 @@ import io.appium.java_client.AppiumDriver;
|
||||
import io.appium.java_client.pagefactory.AndroidFindBy;
|
||||
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import io.mosip.test.mob.inji.utils.CommonMethods;
|
||||
import utils.CommonMethods;
|
||||
|
||||
|
||||
public class ChooseLanguagePage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Choose Language')]")
|
||||
@AndroidFindBy(accessibility = "chooseLanguage")
|
||||
@iOSXCUITFindBy(accessibility = "Choose Language")
|
||||
private WebElement chooseLanguageText;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Save Preference')]")
|
||||
@AndroidFindBy(accessibility = "savePreference")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`label == \"Save Preference\"`]")
|
||||
private WebElement savePreferenceText;
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ public class GenerateUinOrVidPage extends BasePage {
|
||||
return this;
|
||||
}
|
||||
|
||||
public OtpVerification clickOnGetUinOrVidButton() {
|
||||
public OtpVerificationPage clickOnGetUinOrVidButton() {
|
||||
clickOnElement(getUinOrVidButton);
|
||||
return new OtpVerification(driver);
|
||||
return new OtpVerificationPage(driver);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openqa.selenium.WebElement;
|
||||
|
||||
public class HelpPage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Help')]")
|
||||
@AndroidFindBy(accessibility = "helpScreen")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"Help\"`]")
|
||||
private WebElement helpText;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
public class HomePage extends BasePage {
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Download Card')]")
|
||||
@AndroidFindBy(uiAutomator = "new UiSelector().resourceId(\"downloadIcon\")")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`label == \"Download Card\"`]")
|
||||
private WebElement downloadCardButton;
|
||||
|
||||
@@ -34,27 +34,35 @@ public class HomePage extends BasePage {
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Secure Key Storage not found')]")
|
||||
private WebElement secureKeyStoragePopup;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Some security features will be unavailable')]")
|
||||
private WebElement securityFeatureUnavailablePopup;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'OK, I')]")
|
||||
private WebElement riskItButton;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Ok')]")
|
||||
private WebElement okButton;
|
||||
|
||||
@AndroidFindBy(accessibility = "pinIcon")
|
||||
private WebElement pinIcon;
|
||||
|
||||
|
||||
public HomePage(AppiumDriver driver) {
|
||||
super(driver);
|
||||
}
|
||||
|
||||
public boolean isHomePageLoaded() {
|
||||
if (isElementDisplayed(secureKeyStoragePopup, "secure key storage popup")) {
|
||||
/*if (isElementDisplayed(secureKeyStoragePopup, "secure key storage popup")) {
|
||||
clickOnElement(riskItButton);
|
||||
}*/
|
||||
if (isElementDisplayed(securityFeatureUnavailablePopup, "security features will be unavailable popup")) {
|
||||
clickOnElement(okButton);
|
||||
}
|
||||
return this.isElementDisplayed(homeButton, "Home page");
|
||||
}
|
||||
|
||||
public RetrieveIdPage downloadCard() {
|
||||
public AddNewCardPage downloadCard() {
|
||||
this.clickOnElement(downloadCardButton);
|
||||
return new RetrieveIdPage(driver);
|
||||
return new AddNewCardPage(driver);
|
||||
}
|
||||
|
||||
public boolean isNameDisplayed(String name) {
|
||||
|
||||
@@ -7,22 +7,22 @@ import org.openqa.selenium.WebElement;
|
||||
|
||||
public class MoreOptionsPage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Remove from Wallet')]")
|
||||
@AndroidFindBy(accessibility = "removeFromWallet")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`name == \"listItemTitle\"`][4]")
|
||||
private WebElement removeFromWalletButton;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'More Options')]")
|
||||
@AndroidFindBy(accessibility = "kebabTitle")
|
||||
@iOSXCUITFindBy(accessibility = "More Options")
|
||||
private WebElement moreOptionsText;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Pin Card')]")
|
||||
@AndroidFindBy(accessibility = "pinOrUnPinCard")
|
||||
private WebElement pinOrUnPinCardButton;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Activation pending for online login!')]")
|
||||
@AndroidFindBy(accessibility = "pendingActivationOrActivated")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"Activation pending for online login!\"`]")
|
||||
private WebElement activationPending;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Activated for online login!')]")
|
||||
@AndroidFindBy(accessibility = "profileAuthenticated")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeOther[`label == \"\uE8E8 Activated for online login!\"`][4]")
|
||||
private WebElement activatedForOnlineLoginButton;
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ import io.appium.java_client.pagefactory.AndroidFindBy;
|
||||
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
public class OtpVerification extends BasePage {
|
||||
public class OtpVerificationPage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'OTP Verification')]")
|
||||
@iOSXCUITFindBy(accessibility = "OTP Verification")
|
||||
private WebElement otpVerificationText;
|
||||
|
||||
public OtpVerification(AppiumDriver driver) {
|
||||
public OtpVerificationPage(AppiumDriver driver) {
|
||||
super(driver);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,9 @@ public class PleaseConfirmPopupPage extends BasePage {
|
||||
return this.isElementDisplayed(yesButton, "Popup confirmation page");
|
||||
}
|
||||
|
||||
public void clickOnConfirmButton() {
|
||||
public OtpVerificationPage clickOnConfirmButton() {
|
||||
clickOnElement(yesButton);
|
||||
return new OtpVerificationPage(driver);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ public class RetrieveIdPage extends BasePage {
|
||||
return this;
|
||||
}
|
||||
|
||||
public OtpVerification clickOnGenerateCardButton() {
|
||||
public OtpVerificationPage clickOnGenerateCardButton() {
|
||||
this.clickOnElement(generateCardButton);
|
||||
return new OtpVerification(driver);
|
||||
return new OtpVerificationPage(driver);
|
||||
}
|
||||
|
||||
public GenerateUinOrVidPage clickOnGetItNowText() {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package io.mosip.test.mob.inji.pages;
|
||||
|
||||
import io.mosip.test.mob.inji.constants.Target;
|
||||
import io.appium.java_client.AppiumDriver;
|
||||
import io.appium.java_client.pagefactory.AndroidFindBy;
|
||||
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import io.mosip.test.mob.inji.constants.Target;
|
||||
|
||||
public class SetPasscode extends BasePage {
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ import org.openqa.selenium.WebElement;
|
||||
|
||||
public class SettingsPage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Settings')]")
|
||||
@AndroidFindBy(accessibility = "settingsScreen")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"Settings\"`]")
|
||||
private WebElement settingsTittle;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Logout')]")
|
||||
@AndroidFindBy(accessibility = "logout")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"Logout\"`]")
|
||||
private WebElement logoutButton;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openqa.selenium.WebElement;
|
||||
|
||||
public class UnlockApplicationPage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Unlock application')]")
|
||||
@AndroidFindBy(accessibility = "unlockApplication")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`label == \"Unlock application\"`]")
|
||||
private WebElement unlockApplicationButton;
|
||||
|
||||
|
||||
@@ -7,19 +7,19 @@ import org.openqa.selenium.WebElement;
|
||||
|
||||
public class WelcomePage extends BasePage {
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Welcome!')]")
|
||||
@AndroidFindBy(accessibility = "introTitle")
|
||||
@iOSXCUITFindBy(accessibility = "Welcome!")
|
||||
private WebElement welcomeText;
|
||||
|
||||
@AndroidFindBy(xpath = "(//*[@class='android.widget.TextView'])[3]")
|
||||
@AndroidFindBy(accessibility = "introText")
|
||||
@iOSXCUITFindBy(xpath = "//*[contains(@value,'Keep your digital')]")
|
||||
private WebElement welcomeTextDescription;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[contains(@text,'Skip')]")
|
||||
@AndroidFindBy(accessibility = "skip")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeButton[`label == \"Skip\"`][1]")
|
||||
private WebElement skipButton;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[@text='Next']")
|
||||
@AndroidFindBy(accessibility = "next")
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeOther[`label == \"Next\"`][4]")
|
||||
private WebElement nextButton;
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package io.mosip.test.mob.inji.testcases;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import io.mosip.test.mob.inji.pages.*;
|
||||
import io.mosip.test.mob.inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class ActivateVcTest extends BaseTest {
|
||||
@Test(groups = "AVT")
|
||||
@Test
|
||||
public void activateVc() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -27,10 +28,13 @@ public class ActivateVcTest extends BaseTest {
|
||||
HomePage homePage = confirmPasscode.confirmPasscode(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = homePage.downloadCard();
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = addNewCardPage.clickOnDownloadViaUin();
|
||||
|
||||
assertTrue(retrieveIdPage.isRetrieveIdPageLoaded(), "Verify if retrieve id page is displayed");
|
||||
OtpVerification otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
OtpVerificationPage otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
|
||||
assertTrue(otpVerification.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerification.enterOtp(TestDataReader.readData("otp"), target);
|
||||
@@ -42,7 +46,10 @@ public class ActivateVcTest extends BaseTest {
|
||||
PleaseConfirmPopupPage pleaseConfirmPopupPage = moreOptionsPage.clickOnActivationPending();
|
||||
|
||||
assertTrue(pleaseConfirmPopupPage.isPleaseConfirmPopupPageLoaded(), "Verify if pop up page is displayed");
|
||||
pleaseConfirmPopupPage.clickOnConfirmButton();
|
||||
OtpVerificationPage otpVerificationPage = pleaseConfirmPopupPage.clickOnConfirmButton();
|
||||
|
||||
assertTrue(otpVerificationPage.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerificationPage.enterOtp(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(moreOptionsPage.isVcActivatedForOnlineLogin(), "Verify if VC is activated");
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package io.mosip.test.mob.inji.testcases;
|
||||
|
||||
|
||||
import io.appium.java_client.AppiumDriver;
|
||||
import io.mosip.test.mob.inji.constants.Target;
|
||||
import io.mosip.test.mob.inji.driver.DriverManager;
|
||||
import io.mosip.test.mob.inji.exceptions.PlatformNotSupportException;
|
||||
import io.appium.java_client.AppiumDriver;
|
||||
import org.testng.annotations.*;
|
||||
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
public class BaseTest {
|
||||
@@ -26,10 +28,12 @@ public class BaseTest {
|
||||
} catch (MalformedURLException | PlatformNotSupportException | InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
//ScreenRecording.startScreenRecording(driver);
|
||||
}
|
||||
|
||||
@AfterMethod(alwaysRun = true)
|
||||
public void teardown() {
|
||||
//ScreenRecording.stopScreenRecording(driver);
|
||||
driver.quit();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class ChangeLanguageTest extends BaseTest {
|
||||
|
||||
@Test(groups = "CLT")
|
||||
@Test
|
||||
public void changeLanguage() {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import static org.testng.Assert.assertFalse;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class DeletingVcTest extends BaseTest {
|
||||
@Test(groups = "DVT")
|
||||
@Test
|
||||
public void deleteVc() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -28,10 +28,13 @@ public class DeletingVcTest extends BaseTest {
|
||||
HomePage homePage = confirmPasscode.confirmPasscode(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = homePage.downloadCard();
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = addNewCardPage.clickOnDownloadViaUin();
|
||||
|
||||
assertTrue(retrieveIdPage.isRetrieveIdPageLoaded(), "Verify if retrieve id page is displayed");
|
||||
OtpVerification otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
OtpVerificationPage otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
|
||||
assertTrue(otpVerification.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerification.enterOtp(TestDataReader.readData("otp"), target);
|
||||
|
||||
@@ -8,7 +8,7 @@ import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class GenerateUinOrVidTest extends BaseTest {
|
||||
|
||||
@Test(groups = "GUOVT")
|
||||
@Test
|
||||
public void generateUinOrVidUsingAid() {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -28,13 +28,16 @@ public class GenerateUinOrVidTest extends BaseTest {
|
||||
HomePage homePage = confirmPasscode.confirmPasscode(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = homePage.downloadCard();
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = addNewCardPage.clickOnDownloadViaUin();
|
||||
|
||||
assertTrue(retrieveIdPage.isRetrieveIdPageLoaded(), "Verify if retrieve id page is displayed");
|
||||
GenerateUinOrVidPage generateUinOrVidPage = retrieveIdPage.clickOnGetItNowText();
|
||||
|
||||
assertTrue(generateUinOrVidPage.isGenerateUinOrVidPageLoaded(), "Verify if generate uin or vid page page is displayed");
|
||||
OtpVerification otpVerification = generateUinOrVidPage.enterApplicationID(TestDataReader.readData("aid")).clickOnGetUinOrVidButton();
|
||||
OtpVerificationPage otpVerification = generateUinOrVidPage.enterApplicationID(TestDataReader.readData("aid")).clickOnGetUinOrVidButton();
|
||||
|
||||
assertTrue(otpVerification.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerification.enterOtp(TestDataReader.readData("otp"), target);
|
||||
|
||||
@@ -8,7 +8,7 @@ import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class PinVcTest extends BaseTest {
|
||||
|
||||
@Test(groups = "PVT")
|
||||
@Test
|
||||
public void pinVc() throws InterruptedException {
|
||||
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
@@ -29,10 +29,13 @@ public class PinVcTest extends BaseTest {
|
||||
HomePage homePage = confirmPasscode.confirmPasscode(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = homePage.downloadCard();
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = addNewCardPage.clickOnDownloadViaUin();
|
||||
|
||||
assertTrue(retrieveIdPage.isRetrieveIdPageLoaded(), "Verify if retrieve id page is displayed");
|
||||
OtpVerification otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
OtpVerificationPage otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
|
||||
assertTrue(otpVerification.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerification.enterOtp(TestDataReader.readData("otp"), target);
|
||||
|
||||
@@ -8,7 +8,7 @@ import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class UnlockWithPasscodeTest extends BaseTest {
|
||||
|
||||
@Test(groups = "UWPT")
|
||||
@Test
|
||||
public void logoutAndLoginWithPasscode() {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.mosip.test.mob.inji.utils.TestDataReader;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VcDownloadAndVerifyUsingUinTest extends BaseTest {
|
||||
@Test(groups = "VDAVUUT")
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingUin() {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -27,10 +27,13 @@ public class VcDownloadAndVerifyUsingUinTest extends BaseTest {
|
||||
HomePage homePage = confirmPasscode.confirmPasscode(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = homePage.downloadCard();
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = addNewCardPage.clickOnDownloadViaUin();
|
||||
|
||||
assertTrue(retrieveIdPage.isRetrieveIdPageLoaded(), "Verify if retrieve id page is displayed");
|
||||
OtpVerification otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
OtpVerificationPage otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
|
||||
assertTrue(otpVerification.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerification.enterOtp(TestDataReader.readData("otp"), target);
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.mosip.test.mob.inji.utils.TestDataReader;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VcDownloadAndVerifyUsingVidTest extends BaseTest {
|
||||
@Test(groups = "VDAVUVT")
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingVid() {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -27,10 +27,13 @@ public class VcDownloadAndVerifyUsingVidTest extends BaseTest {
|
||||
HomePage homePage = confirmPasscode.confirmPasscode(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = homePage.downloadCard();
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = addNewCardPage.clickOnDownloadViaUin();
|
||||
|
||||
assertTrue(retrieveIdPage.isRetrieveIdPageLoaded(), "Verify if retrieve id page is displayed");
|
||||
OtpVerification otpVerification = retrieveIdPage.clickOnVid(target).setEnterIdTextBox(TestDataReader.readData("vid")).clickOnGenerateCardButton();
|
||||
OtpVerificationPage otpVerification = retrieveIdPage.clickOnVid(target).setEnterIdTextBox(TestDataReader.readData("vid")).clickOnGenerateCardButton();
|
||||
|
||||
assertTrue(otpVerification.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerification.enterOtp(TestDataReader.readData("otp"), target);
|
||||
|
||||
@@ -8,7 +8,7 @@ import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VerifyHelpPageTest extends BaseTest {
|
||||
|
||||
@Test(groups = "VHPT")
|
||||
@Test
|
||||
public void verifyHelpPage() {
|
||||
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.mosip.test.mob.inji.utils.TestDataReader;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VerifyHistoryTest extends BaseTest {
|
||||
@Test(groups = "VHT")
|
||||
@Test
|
||||
public void generateAndVerifyHistory() {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -27,10 +27,13 @@ public class VerifyHistoryTest extends BaseTest {
|
||||
HomePage homePage = confirmPasscode.confirmPasscode(TestDataReader.readData("passcode"), target);
|
||||
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = homePage.downloadCard();
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
RetrieveIdPage retrieveIdPage = addNewCardPage.clickOnDownloadViaUin();
|
||||
|
||||
assertTrue(retrieveIdPage.isRetrieveIdPageLoaded(), "Verify if retrieve id page is displayed");
|
||||
OtpVerification otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
OtpVerificationPage otpVerification = retrieveIdPage.setEnterIdTextBox(TestDataReader.readData("uin")).clickOnGenerateCardButton();
|
||||
|
||||
assertTrue(otpVerification.isOtpVerificationPageLoaded(), "Verify if otp verification page is displayed");
|
||||
otpVerification.enterOtp(TestDataReader.readData("otp"), target);
|
||||
|
||||
@@ -3,12 +3,11 @@ package io.mosip.test.mob.inji.testcases;
|
||||
import org.testng.annotations.Test;
|
||||
import io.mosip.test.mob.inji.pages.*;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VerifyWelcomePagesTest extends BaseTest {
|
||||
|
||||
@Test(groups = "VWPT")
|
||||
@Test
|
||||
public void verifyWelcomePagesContent() {
|
||||
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package io.mosip.test.mob.inji.utils;
|
||||
|
||||
import io.appium.java_client.AppiumDriver;
|
||||
import io.appium.java_client.screenrecording.CanRecordScreen;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Base64;
|
||||
|
||||
public class ScreenRecording {
|
||||
|
||||
public static void startScreenRecording(AppiumDriver driver){
|
||||
((CanRecordScreen)driver).startRecordingScreen();
|
||||
}
|
||||
|
||||
public static void stopScreenRecording(AppiumDriver driver){
|
||||
String base64String = ((CanRecordScreen)driver).stopRecordingScreen();
|
||||
byte[] data = Base64.getDecoder().decode(base64String);
|
||||
String
|
||||
destinationPath="report/videoRecording.mp4";
|
||||
Path path = Paths.get(destinationPath);
|
||||
try {
|
||||
Files.write(path, data);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"uin": "6187360582",
|
||||
"vid": "5037415473849368",
|
||||
"uin": "5740943928",
|
||||
"vid": "61305189560392",
|
||||
"otp": "111111",
|
||||
"passcode": "111111",
|
||||
"fullName": "santush",
|
||||
"fullName": "fbgfhgfhghd",
|
||||
"idType": "National card",
|
||||
"status": "Valid",
|
||||
"generatedOn": "9/5/2023",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user