Skip to content

Commit bae2823

Browse files
committed
chore: remove old code
In some old Appium version click() was broken on iOS and we used tap. Rollback, this will also speedup tests.
1 parent d92b22b commit bae2823

2 files changed

Lines changed: 10 additions & 17 deletions

File tree

src/main/java/functional/tests/core/mobile/element/UIElement.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,8 @@ public void click() {
242242
}
243243

244244
public void click(String description) {
245-
if (this.settings.platform == PlatformType.Android) {
246-
this.element.click();
247-
LOGGER_BASE.info("Click on " + description);
248-
} else {
249-
// Due to issue with Appium@1.9.0 fallback to tap();
250-
this.tap();
251-
}
245+
this.element.click();
246+
LOGGER_BASE.info("Click on " + description);
252247
}
253248

254249
public void tap(int waitAfterTap) {

src/main/java/functional/tests/core/mobile/helpers/NavigationHelper.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,9 @@ public static boolean navigateTo(String demoPath, NavigationManager navigationMa
7373

7474
if (demoBtn == null && rectBtn == null) {
7575
return false;
76-
}
77-
if (demoBtn != null) {
78-
if (mobileContext.settings.platformVersion < 10 && mobileContext.settings.platform == PlatformType.iOS) {
79-
demoBtn.click();
80-
} else {
81-
demoBtn.tap();
82-
}
83-
}
84-
if (rectBtn != null) {
76+
} else if (demoBtn != null) {
77+
demoBtn.click();
78+
} else if (rectBtn != null) {
8579
LOGGER_BASE.info(demoPath);
8680
rectBtn.tap();
8781
}
@@ -92,7 +86,11 @@ public static boolean navigateTo(String demoPath, NavigationManager navigationMa
9286

9387
if (i < demos.length - 1) {
9488
String nextBtnText = demos[i + 1];
95-
UIElement nextDemoBtn = mobileContext.wait.waitForVisible(mobileContext.locators.byText(nextBtnText), 5, false);
89+
if (mobileContext.settings.platform == PlatformType.Android) {
90+
mobileContext.wait.waitForVisible(mobileContext.locators.byText(nextBtnText), 5, false);
91+
} else {
92+
mobileContext.wait.waitForVisible(MobileBy.AccessibilityId(nextBtnText), 5, false);
93+
}
9694
}
9795
}
9896

0 commit comments

Comments
 (0)