Skip to content

Commit

Permalink
updated regex in epub ios
Browse files Browse the repository at this point in the history
  • Loading branch information
AEkaterina committed Jan 5, 2024
1 parent 781f64f commit e44dc8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/screens/epub/ReaderEpubScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit e44dc8b

Please sign in to comment.