Skip to content

Commit

Permalink
moved
Browse files Browse the repository at this point in the history
  • Loading branch information
grablack committed Aug 27, 2024
1 parent 7e6f3be commit dbad550
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion demo/src/androidTest/java/common/EsspressoUi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ fun clickSeeOtherModalOptions() {
fun clickDisclosure() {
onWebView(
ViewMatchers.withId(R.id.ModalWebView),
).forceJavascriptEnabled().withElement(DriverAtoms.findElement(Locator.CLASS_NAME, "a")).perform(DriverAtoms.webClick())
).withElement(DriverAtoms.findElement(Locator.XPATH, "/html/body/div/div[3]/div/div[5]/main/div/div[2]/a")).perform(DriverAtoms.webClick())
// onWebView(
// ViewMatchers.withId(R.id.ModalWebView),
// ).forceJavascriptEnabled().withElement(DriverAtoms.findElement(Locator.XPATH, "/html/body/div/div[3]/div/div[5]/main/div/div[2]/a")).perform(DriverAtoms.webClick())
}

fun modalContent(expectedText: String) {
Expand All @@ -181,6 +184,12 @@ fun clearCalculatorAmount() {
.perform(DriverAtoms.clearElement())
}

fun clickApplyNow() {
onWebView(withId(R.id.ModalWebView))
.withElement(DriverAtoms.findElement(Locator.CSS_SELECTOR, "button.button")) // Change to your input box selector
.perform(DriverAtoms.webClick())
}

fun checkPi4ModalContent() {
modalContent("Pay in 4")
}
Expand Down

0 comments on commit dbad550

Please sign in to comment.