From 58a47dcc21bd4515b84617861ababcf727bc0208 Mon Sep 17 00:00:00 2001 From: AEkaterina Date: Wed, 20 Dec 2023 04:13:53 +0400 Subject: [PATCH 1/4] updated feature for Audiobook and locators for epubs --- src/test/java/features/AudiobookOverdrive.feature | 6 +++--- src/test/java/screens/TutorialScreen.java | 2 +- src/test/java/screens/epub/NavigationBarScreen.java | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/java/features/AudiobookOverdrive.feature b/src/test/java/features/AudiobookOverdrive.feature index 00c8e81..4f10a4f 100644 --- a/src/test/java/features/AudiobookOverdrive.feature +++ b/src/test/java/features/AudiobookOverdrive.feature @@ -72,12 +72,12 @@ Feature: Audiobooks in A1QA library And Book is not playing on audio player screen When Save book play time as 'timeAhead' on audio player screen And Save chapter time as 'chapterTimeKey' on audio player screen - And Skip ahead 15 seconds on audio player screen + And Skip ahead 30 seconds on audio player screen And Tap pause button on audio player screen Then Play button is present on audio player screen And Playback has been moved forward by 30 seconds from 'timeAhead' and 'chapterTimeKey' seconds on audio player screen When Save book play time as 'timeBehind' on audio player screen - And Skip behind 15 seconds on audio player screen + And Skip behind 30 seconds on audio player screen And Tap pause button on audio player screen Then Play button is present on audio player screen And Playback has been moved behind by 30 seconds from 'timeBehind' and 'chapterTimeKey' seconds on audio player screen @@ -137,7 +137,7 @@ Feature: Audiobooks in A1QA library Then Check that book contains LISTEN action button on Book details screen When Click LISTEN action button on Book details screen Then Audio player screen of book 'bookInfo' is opened - And The speed by default is 1.0 + And The speed by default is "1.0"X When Open playback speed on audio player screen And Close playback speed screen Then Play button is present on audio player screen diff --git a/src/test/java/screens/TutorialScreen.java b/src/test/java/screens/TutorialScreen.java index bb658a8..8897bdf 100644 --- a/src/test/java/screens/TutorialScreen.java +++ b/src/test/java/screens/TutorialScreen.java @@ -23,7 +23,7 @@ public class TutorialScreen extends Screen { private final IButton btnCloseTutorial = getElementFactory().getButton(LocatorUtils.getLocator( new AndroidLocator(By.xpath("//android.widget.ImageView[contains(@resource-id, \"skip_button\")]")), - new IosLocator(By.xpath("//XCUIElementTypeButton"))), "Close tutorial btn"); + new IosLocator(By.xpath("//XCUIElementTypeButton[@name=\"Close\"]"))), "Close tutorial btn"); private final ILabel lblPage = getElementFactory().getLabel(LocatorUtils.getLocator( new AndroidLocator(By.xpath("//android.widget.ImageView[@content-desc=\"Tutorial page\"]")), new IosLocator(By.xpath("//XCUIElementTypeWindow"))), "Page label"); diff --git a/src/test/java/screens/epub/NavigationBarScreen.java b/src/test/java/screens/epub/NavigationBarScreen.java index abb6665..98bb880 100644 --- a/src/test/java/screens/epub/NavigationBarScreen.java +++ b/src/test/java/screens/epub/NavigationBarScreen.java @@ -17,10 +17,10 @@ public class NavigationBarScreen extends Screen { new AndroidLocator(By.xpath("//android.widget.Button[contains(@resource-id,\"readerMenuTOC\")]")), new IosLocator(By.xpath("//XCUIElementTypeNavigationBar/XCUIElementTypeButton[@name=\"Table of contents and bookmarks\"]"))), "TOC button"); private final IButton btnAddBookmark = getElementFactory().getButton(LocatorUtils.getLocator( - new AndroidLocator(By.xpath("//android.widget.TextView[@content-desc=\"Create a bookmark for the current page\"]")), + new AndroidLocator(By.id("readerMenuAddBookmark")), new IosLocator(By.xpath("//XCUIElementTypeNavigationBar/XCUIElementTypeButton[@name=\"Add Bookmark\"]"))), "Add Bookmark button"); private final IButton btnDeleteBookmark = getElementFactory().getButton(LocatorUtils.getLocator( - new AndroidLocator(By.xpath("//android.widget.TextView[@content-desc=\"Delete the bookmark for the current page\"]")), + new AndroidLocator(By.xpath("//android.widget.TextView[contains(@content-desc,\"Delete the bookmark\")]")), new IosLocator(By.xpath("//XCUIElementTypeNavigationBar/XCUIElementTypeButton[@name=\"Remove Bookmark\"]"))), "Delete bookmark button"); private final IButton btnFontSettings = getElementFactory().getButton(LocatorUtils.getLocator( new AndroidLocator(By.xpath("//android.widget.TextView[contains(@resource-id,\"readerMenuSettings\")]")), @@ -48,7 +48,7 @@ public void tapAddBookmarkButton() { } public boolean isBookmarkDisplayed() { - return btnDeleteBookmark.state().isDisplayed(); + return btnDeleteBookmark.state().waitForDisplayed(); } public void tapDeleteBookmarkButton() { From fa392d68161b1982a0381ffcfcf8159bb3e1a60c Mon Sep 17 00:00:00 2001 From: AEkaterina Date: Wed, 20 Dec 2023 04:55:15 +0400 Subject: [PATCH 2/4] updated feature for Search --- src/test/java/features/Search.feature | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/test/java/features/Search.feature b/src/test/java/features/Search.feature index 5c6c9bf..8fd5b72 100644 --- a/src/test/java/features/Search.feature +++ b/src/test/java/features/Search.feature @@ -142,15 +142,16 @@ Feature: Search module When Close welcome screen Then Add library screen is opened When Add library "LYRASIS Reads" on Add library screen + And Wait for 3 seconds And Open search modal And Search for word and save as 'info' on Catalog books screen Then Books contain word 'info' on Catalog books screen Scenarios: - | word | - | cat | - | a | - | 1 | + | word | + | in | + | a | + | 0 | @tier2 Scenario Outline: Find a book with name in different font cases in LYRASIS Reads @@ -165,9 +166,9 @@ Feature: Search module Scenarios: |word | - | silk road | - | SILK ROAD | - | SiLk rOaD | + | the silk road | + | THE SILK ROAD | + | ThE SiLk rOaD | @tier2 Scenario Outline: Enter invalid data in book name in LYRASIS Reads @@ -176,6 +177,7 @@ Feature: Search module When Close welcome screen Then Add library screen is opened When Add library "LYRASIS Reads" on Add library screen + And Wait for 3 seconds And Open search modal And Search for word and save as 'info' on Catalog books screen Then There is no results on Catalog books screen From 53922208394684c10c37b106e771c15d400ae54e Mon Sep 17 00:00:00 2001 From: AEkaterina Date: Wed, 20 Dec 2023 05:23:20 +0400 Subject: [PATCH 3/4] updated locator for Sorting --- src/test/java/screens/SortOptionsScreen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/screens/SortOptionsScreen.java b/src/test/java/screens/SortOptionsScreen.java index 0534c0f..638be2a 100644 --- a/src/test/java/screens/SortOptionsScreen.java +++ b/src/test/java/screens/SortOptionsScreen.java @@ -16,7 +16,7 @@ public class SortOptionsScreen extends Screen { private final IButton btnSortBy = getElementFactory().getButton(LocatorUtils.getLocator( - new AndroidLocator(By.xpath("//android.widget.HorizontalScrollView/android.widget.LinearLayout/android.widget.Button[2]")), + new AndroidLocator(By.xpath("//android.widget.HorizontalScrollView/android.widget.LinearLayout/android.widget.Button")), new IosLocator(By.xpath("//XCUIElementTypeStaticText[@name=\"Sort By:\"]/following-sibling::XCUIElementTypeButton"))), "Sort by button"); private final IButton btnAvailability = getElementFactory().getButton(LocatorUtils.getLocator( new AndroidLocator(By.xpath("//*[contains(@resource-id,\"feedHeaderFacets\")]/android.widget.Button[1]")), From 5f62e7a3c7d605c385a771f9fd152fa2bb41cb99 Mon Sep 17 00:00:00 2001 From: AEkaterina Date: Thu, 21 Dec 2023 01:50:37 +0400 Subject: [PATCH 4/4] updated tests for Manage libraries --- .../java/features/ManageLibraries.feature | 6 ++-- src/test/java/screens/AddLibraryScreen.java | 8 ++--- src/test/java/screens/CatalogScreen.java | 5 +-- .../java/screens/FindYourLibraryScreen.java | 36 +++++++------------ src/test/java/screens/LibrariesScreen.java | 4 +-- .../java/stepdefinitions/AccountSteps.java | 1 + .../stepdefinitions/ApplicationSteps.java | 2 +- .../java/stepdefinitions/CatalogSteps.java | 2 +- .../stepdefinitions/CredentialsSteps.java | 3 +- 9 files changed, 29 insertions(+), 38 deletions(-) diff --git a/src/test/java/features/ManageLibraries.feature b/src/test/java/features/ManageLibraries.feature index e4c6c58..1f33428 100644 --- a/src/test/java/features/ManageLibraries.feature +++ b/src/test/java/features/ManageLibraries.feature @@ -80,7 +80,7 @@ Feature: Manage Libraries And Open Catalog And Switch to 'Palace Bookshelf' from side menu And Open categories by chain and chain starts from CategoryScreen: - | Summer Reading | + | Holiday Reads | And Click GET action button on the first EBOOK book on catalog books screen and save book as 'bookInfo' And Open Books Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on books screen @@ -183,8 +183,8 @@ Feature: Manage Libraries | Escondido Public Library | | Granby Public Library | | Victorville City Library | - And Save 5 amount as 'amountKey' - When Tap the logo on catalog screen + And Save 6 amount as 'amountKey' + And Tap the logo on catalog screen Then The sorting of 'amountKey' libraries is alphabetical on find your library screen When Tap cancel button on find your library screen Then Category names are loaded on Catalog screen diff --git a/src/test/java/screens/AddLibraryScreen.java b/src/test/java/screens/AddLibraryScreen.java index acc94fd..de28ca6 100644 --- a/src/test/java/screens/AddLibraryScreen.java +++ b/src/test/java/screens/AddLibraryScreen.java @@ -2,7 +2,6 @@ import aquality.appium.mobile.elements.ElementType; import aquality.appium.mobile.elements.interfaces.IButton; -import aquality.appium.mobile.elements.interfaces.IElement; import aquality.appium.mobile.elements.interfaces.ILabel; import aquality.appium.mobile.elements.interfaces.ITextBox; import aquality.appium.mobile.screens.Screen; @@ -32,7 +31,8 @@ public class AddLibraryScreen extends Screen { new AndroidLocator(By.id("search_close_btn")), new IosLocator(By.xpath("//XCUIElementTypeButton[@name=\"clear.button.text\"]"))), "Clear search field button"); - private static final String LIBRARY_BUTTON_LOCATOR_ANDROID = "//android.widget.TextView[contains(@text, \"%s\")]"; + private static final String CURRENT_LIBRARY_BUTTON_LOCATOR_ANDROID = "//android.widget.TextView[contains(@text, \"%s\")]"; + private static final String LIBRARY_BUTTON_LOCATOR_ANDROID = "//androidx.recyclerview.widget.RecyclerView/android.view.ViewGroup/android.widget.TextView[1]"; private static final String LIBRARY_BUTTON_LOCATOR_IOS = "//XCUIElementTypeStaticText[contains(@name, \"%s\")]"; @@ -108,12 +108,12 @@ public boolean isSortingOfLibrariesCorrect() { private IButton getLibraryButton(String libraryName) { return getElementFactory().getButton(LocatorUtils.getLocator( - new AndroidLocator(By.xpath(String.format(LIBRARY_BUTTON_LOCATOR_ANDROID, libraryName))), + new AndroidLocator(By.xpath(String.format(CURRENT_LIBRARY_BUTTON_LOCATOR_ANDROID, libraryName))), new IosLocator(By.xpath(String.format(LIBRARY_BUTTON_LOCATOR_IOS, libraryName)))), libraryName); } private List getLibrariesNames() { - List libraries = getElementFactory().findElements(LocatorUtils.getLocator( + List libraries = getElementFactory().findElements(LocatorUtils.getLocator( new AndroidLocator(By.xpath(LIBRARY_BUTTON_LOCATOR_ANDROID)), new IosLocator(By.xpath(LIBRARY_BUTTON_LOCATOR_IOS))), ElementType.LABEL); diff --git a/src/test/java/screens/CatalogScreen.java b/src/test/java/screens/CatalogScreen.java index 7492a88..966ae6c 100644 --- a/src/test/java/screens/CatalogScreen.java +++ b/src/test/java/screens/CatalogScreen.java @@ -10,6 +10,7 @@ import aquality.appium.mobile.screens.Screen; import aquality.selenium.core.elements.ElementState; import aquality.selenium.core.elements.ElementsCount; +import constants.appattributes.AndroidAttributes; import constants.appattributes.IosAttributes; import framework.utilities.ActionProcessorUtils; import framework.utilities.LocatorUtils; @@ -42,7 +43,7 @@ public class CatalogScreen extends Screen { private static final String CATEGORY_NAME_LOCATOR_ANDROID = "//android.widget.TextView[contains(@resource-id, \"feedLaneTitle\") and @text=\"%1$s\"]/parent::android.widget.LinearLayout/following-sibling::*[contains(@resource-id,\"feedLaneCoversScroll\")]"; private static final String CATEGORY_LOCATOR_ANDROID = "//androidx.recyclerview.widget.RecyclerView//android.widget.LinearLayout/android.widget.TextView[1]"; private static final String BOOK_COVER_IN_CATEGORY_LOCATOR_ANDROID = "/android.widget.FrameLayout"; - private static final String BOOK_NAME_LOCATOR_ANDROID = "//androidx.recyclerview.widget.RecyclerView[contains(@resource-id,\"feedWithoutGroupsList\")]/android.widget.FrameLayout/android.view.ViewGroup/android.widget.TextView[1]"; + private static final String BOOK_NAME_LOCATOR_ANDROID = "//androidx.recyclerview.widget.RecyclerView[contains(@resource-id,\"feedLaneCoversScroll\")]/android.widget.FrameLayout"; private static final String CURRENT_CATEGORY_LOCATOR_ANDROID = "//android.widget.TextView[contains(@resource-id, \"feedLaneTitle\") and @text=\"%1$s\"]"; private static final String MORE_BUTTON_LOCATOR_ANDROID = "//android.widget.LinearLayout/android.widget.TextView[@text=\"Moreā€¦\"]"; private static final String CURRENT_SECTION_LOCATOR_IN_CATALOG_ANDROID = "//androidx.recyclerview.widget.RecyclerView/android.widget.LinearLayout[%d]/android.widget.LinearLayout/android.widget.TextView[1]"; @@ -96,7 +97,7 @@ public Set getListOfBooksNameInFirstCategory() { public List getListOfBooksNames() { List listOfBookNames = ActionProcessorUtils.doForAndroid(() -> { List listOfBooks = getElementFactory().findElements(By.xpath(BOOK_NAME_LOCATOR_ANDROID), ElementType.LABEL); - return listOfBooks.stream().map(book -> book.getText()).collect(Collectors.toList()); + return listOfBooks.stream().map(book -> book.getAttribute(AndroidAttributes.CONTENT_DESC)).collect(Collectors.toList()); }); if(listOfBookNames == null) { diff --git a/src/test/java/screens/FindYourLibraryScreen.java b/src/test/java/screens/FindYourLibraryScreen.java index 816a84f..c3ceb71 100644 --- a/src/test/java/screens/FindYourLibraryScreen.java +++ b/src/test/java/screens/FindYourLibraryScreen.java @@ -1,5 +1,6 @@ package screens; +import aquality.appium.mobile.elements.ElementType; import aquality.appium.mobile.elements.interfaces.IButton; import aquality.appium.mobile.elements.interfaces.ILabel; import aquality.appium.mobile.screens.Screen; @@ -16,16 +17,13 @@ public class FindYourLibraryScreen extends Screen { private final IButton btnAddLib = getElementFactory().getButton(LocatorUtils.getLocator( new AndroidLocator(By.xpath("//android.widget.LinearLayout//android.widget.TextView[@text=\"Add Library\"]")), new IosLocator(By.xpath("//XCUIElementTypeScrollView//XCUIElementTypeButton[@name=\"Add Library\"]"))), "Add library button"); - private final CreatingLibraryLocator libraryLocator = (index -> - getElementFactory().getLabel(LocatorUtils.getLocator( - new AndroidLocator(By.xpath(String.format("//android.widget.LinearLayout//androidx.recyclerview.widget.RecyclerView/android.widget.LinearLayout[%d]/android.widget.LinearLayout/android.widget.TextView[1]", index))), - new IosLocator(By.xpath(String.format("//XCUIElementTypeSheet//XCUIElementTypeScrollView[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[%d]/XCUIElementTypeButton", index)))), "Library")); private final IButton btnCancel = getElementFactory().getButton(LocatorUtils.getLocator( new AndroidLocator(By.xpath("//android.widget.TextView[@text=\"Cancel\"]")), new IosLocator(By.xpath("//XCUIElementTypeSheet//XCUIElementTypeScrollView//XCUIElementTypeButton[@name=\"Cancel\"]"))), "Close button"); private static final String LIBRARY_NAME_IOS = "//XCUIElementTypeSheet//XCUIElementTypeScrollView//XCUIElementTypeButton[@name=\"%s\"]"; - private static final String LIBRARY_NAME_ANDROID = "//android.widget.LinearLayout/android.widget.TextView[@text=\"%s\"]"; + private static final String CURRENT_LIBRARY_NAME_LOCATOR_ANDROID = "//android.widget.LinearLayout/android.widget.TextView[@text=\"%s\"]"; + private static final String LIBRARY_NAME_LOCATOR_ANDROID = "//androidx.recyclerview.widget.RecyclerView[contains(@resource-id,\"recyclerView\")]/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView[1]"; public FindYourLibraryScreen() { super(LocatorUtils.getLocator( @@ -39,12 +37,12 @@ public void tapAddLibrary() { public void tapToLibrary(String libName) { getElementFactory().getButton(LocatorUtils.getLocator( - new AndroidLocator(By.xpath(String.format(LIBRARY_NAME_ANDROID, libName))), + new AndroidLocator(By.xpath(String.format(CURRENT_LIBRARY_NAME_LOCATOR_ANDROID, libName))), new IosLocator(By.xpath(String.format(LIBRARY_NAME_IOS, libName)))), "Library button").click(); } - public boolean isSortingAlphabetical(int amountOfLibraries) { - List libraries = getListOfLibraries(amountOfLibraries); + public boolean isSortingAlphabetical(int libraryAmount) { + List libraries = getListOfLibraries(libraryAmount); return Ordering.natural().isOrdered(libraries); } @@ -52,21 +50,13 @@ public void tapCancelBtn() { btnCancel.click(); } - private List getListOfLibraries(int listSize) { - List libraries = new ArrayList<>(); - int index = 1; - int end = 0; - while (end <= listSize) { - ILabel lblLibrary = libraryLocator.createLbl(index); - libraries.add(lblLibrary.getText()); - index+=2; - end++; - } - return libraries; - } + private List getListOfLibraries(int amount) { + List libraryLabels = getElementFactory().findElements(LocatorUtils.getLocator( + new AndroidLocator(By.xpath(LIBRARY_NAME_LOCATOR_ANDROID)), + new IosLocator(By.xpath("asd"))), ElementType.LABEL); - @FunctionalInterface - interface CreatingLibraryLocator { - ILabel createLbl(int index); + List libraries = new ArrayList<>(); + libraryLabels.stream().limit(amount).forEach(label -> libraries.add(label.getText().toLowerCase())); + return libraries; } } diff --git a/src/test/java/screens/LibrariesScreen.java b/src/test/java/screens/LibrariesScreen.java index 66064bf..5caae25 100644 --- a/src/test/java/screens/LibrariesScreen.java +++ b/src/test/java/screens/LibrariesScreen.java @@ -25,9 +25,8 @@ public class LibrariesScreen extends Screen { new AndroidLocator(By.id("accountsMenuActionAccountAdd")), new IosLocator(By.xpath("//XCUIElementTypeButton[@name=\"Add Library\"]"))), "Add library button"); private final IButton btnDeleteLibrary = getElementFactory().getButton(LocatorUtils.getLocator( - new AndroidLocator(By.xpath("//android.widget.TextView[@text=\"Delete\"]")), + new AndroidLocator(By.xpath("//android.widget.Button[@text=\"Remove\"]")), new IosLocator(By.xpath("//XCUIElementTypeButton[@label=\"Delete\"]"))), "Delete library button"); - private final IButton btnAcceptDeletionAndroid = getElementFactory().getButton(By.id("android:id/button1"), "btnAcceptDeletion"); private static final String LIBRARY_NAME_LOC_IOS = "//XCUIElementTypeStaticText[@name=\"%s\"]/parent::XCUIElementTypeCell"; private static final String LIBRARY_NAME_ON_LIBRARY_SETTINGS_LOC_IOS = "//XCUIElementTypeStaticText[@name=\"%s\"]"; @@ -101,7 +100,6 @@ public void deleteLibrary(String libraryName) { ActionProcessorUtils.doForAndroid(() -> { getElementFactory().getButton(By.xpath(String.format(POPUP_MENU_BUTTON_BY_LIBRARY_NAME_LOC_ANDROID, libraryName)), "Popup menu button").click(); btnDeleteLibrary.click(); - btnAcceptDeletionAndroid.click(); }); } diff --git a/src/test/java/stepdefinitions/AccountSteps.java b/src/test/java/stepdefinitions/AccountSteps.java index 07e345a..42285eb 100644 --- a/src/test/java/stepdefinitions/AccountSteps.java +++ b/src/test/java/stepdefinitions/AccountSteps.java @@ -224,6 +224,7 @@ public void removeAccount(String libraryName) { @Then("Library {string} is not present on Libraries screen") public void checkAccountIsNotPresent(String libraryName) { + openAccounts(); Assert.assertFalse(libraryName + " is present on Accounts screen", librariesScreen.isLibraryPresent(libraryName)); } diff --git a/src/test/java/stepdefinitions/ApplicationSteps.java b/src/test/java/stepdefinitions/ApplicationSteps.java index c35d416..48c8281 100644 --- a/src/test/java/stepdefinitions/ApplicationSteps.java +++ b/src/test/java/stepdefinitions/ApplicationSteps.java @@ -176,7 +176,7 @@ public void tapTheLogo() { @Then("The sorting of {string} libraries is alphabetical on find your library screen") public void isSortingCorrect(String amountKey) { int amount = context.get(amountKey); - Assert.assertTrue("The list of libraries is not in alphabetical ored", findYourLibraryScreen.isSortingAlphabetical(amount)); + Assert.assertTrue("The list of libraries is not in alphabetical order", findYourLibraryScreen.isSortingAlphabetical(amount)); } @When("Tap cancel button on find your library screen") diff --git a/src/test/java/stepdefinitions/CatalogSteps.java b/src/test/java/stepdefinitions/CatalogSteps.java index cabf3a4..864a9b3 100644 --- a/src/test/java/stepdefinitions/CatalogSteps.java +++ b/src/test/java/stepdefinitions/CatalogSteps.java @@ -86,7 +86,7 @@ public void checkCurrentCategoryName(String expectedCategoryName) { @Then("List of books on screen is not equal to list of books saved as {string}") public void checkListOfBooksAndSavedListOfBooks(String booksNamesListKey) { List expectedList = context.get(booksNamesListKey); - List actualList = catalogBooksScreen.getListOfBooks(); + List actualList = catalogScreen.getListOfBooksNames(); Assert.assertNotEquals("Lists of books are equal" + expectedList.stream().map(Object::toString).collect(Collectors.joining(", ")), expectedList, actualList); } diff --git a/src/test/java/stepdefinitions/CredentialsSteps.java b/src/test/java/stepdefinitions/CredentialsSteps.java index 94d059b..693238d 100644 --- a/src/test/java/stepdefinitions/CredentialsSteps.java +++ b/src/test/java/stepdefinitions/CredentialsSteps.java @@ -8,6 +8,7 @@ import enums.localization.catalog.ActionButtonsForBooksAndAlertsKeys; import framework.configuration.Configuration; import framework.configuration.Credentials; +import framework.utilities.ActionProcessorUtils; import framework.utilities.ScenarioContext; import framework.utilities.returningbooksutil.APIUtil; import io.cucumber.java.en.Then; @@ -78,7 +79,7 @@ public void checkLoginIsPerformedSuccessfully() { @When("Click the log out button on the account screen") public void clickLogOut() { accountScreen.tapSignOut(); - accountScreen.tapApproveSignOut(); + ActionProcessorUtils.doForIos(accountScreen::tapApproveSignOut); if(alertScreen.state().waitForDisplayed()){ alertScreen.waitAndPerformAlertActionIfDisplayed(ActionButtonsForBooksAndAlertsKeys.SIGN_OUT); }