From e44dc8b7b79f4aa4edd96e45b0a5593018e16030 Mon Sep 17 00:00:00 2001 From: AEkaterina Date: Sat, 6 Jan 2024 03:17:53 +0400 Subject: [PATCH] updated regex in epub ios --- src/test/java/screens/epub/ReaderEpubScreen.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/screens/epub/ReaderEpubScreen.java b/src/test/java/screens/epub/ReaderEpubScreen.java index 155f40d..5aaef0a 100644 --- a/src/test/java/screens/epub/ReaderEpubScreen.java +++ b/src/test/java/screens/epub/ReaderEpubScreen.java @@ -15,6 +15,7 @@ import io.appium.java_client.touch.offset.PointOption; import models.AndroidLocator; import models.IosLocator; +import org.apache.commons.lang3.StringUtils; import org.openqa.selenium.By; public class ReaderEpubScreen extends Screen { @@ -87,8 +88,7 @@ public void hideNavigationBar() { public String getPageNumber() { String pageNumber = ActionProcessorUtils.doForIos(() -> { String number = lblPageNumber.getAttribute(IosAttributes.NAME); - number = RegExUtil.deleteBracketsFromText(number); - return RegExUtil.getStringFromFirstGroup(number, RegEx.PAGE_NUMBER_AND_CHAPTER_NAME_REGEX_FOR_IOS); + return StringUtils.substringBetween(number, "Page", "of"); }); if ((pageNumber == null)) {