|
|
|
@ -39,6 +39,7 @@ import org.mozilla.fenix.helpers.Constants
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.LONG_CLICK_DURATION
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.RETRY_COUNT
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.SPEECH_RECOGNITION
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
|
|
|
|
import org.mozilla.fenix.helpers.SessionLoadedIdlingResource
|
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
|
|
|
|
@ -212,10 +213,11 @@ class SearchRobot {
|
|
|
|
|
searchEnginesShortcutButton.click()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun clickScanButton() {
|
|
|
|
|
scanButton.waitForExists(waitingTime)
|
|
|
|
|
scanButton.click()
|
|
|
|
|
}
|
|
|
|
|
fun clickScanButton() =
|
|
|
|
|
scanButton.also {
|
|
|
|
|
it.waitForExists(waitingTime)
|
|
|
|
|
it.click()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun clickDismissPermissionRequiredDialog() {
|
|
|
|
|
dismissPermissionButton.waitForExists(waitingTime)
|
|
|
|
@ -399,7 +401,10 @@ private val goToPermissionsSettingsButton =
|
|
|
|
|
mDevice.findObject(UiSelector().text("GO TO SETTINGS"))
|
|
|
|
|
|
|
|
|
|
private val scanButton =
|
|
|
|
|
mDevice.findObject(UiSelector().resourceId("$packageName:id/qr_scan_button"))
|
|
|
|
|
itemWithResIdAndText(
|
|
|
|
|
"$packageName:id/qr_scan_button",
|
|
|
|
|
getStringResource(R.string.search_scan_button),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
private fun clearButton() =
|
|
|
|
|
mDevice.findObject(UiSelector().resourceId("$packageName:id/mozac_browser_toolbar_clear_view"))
|
|
|
|
|