class CaracteristicasPublicacionLocators: CANTIDAD_DIAS_TEMP = UiLocator( MobileBy.XPATH, '//android.view.ViewGroup[android.view.ViewGroup/android.widget.TextView[@text="{cant_dias}"]]' ) PRECIO_PUBLICACION_VW = UiLocator( MobileBy.XPATH, '//android.widget.TextView[contains(@text, "$")]')
class LoginStrategies: FACEBOOK_LOGIN_TEXTVIEW = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.view.ViewGroup").childSelector(' 'new UiSelector().className("android.widget.TextView").text("Continuar con Facebook")' ')') GOOGLE_LOGIN_TEXTVIEW = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.view.ViewGroup").childSelector(' 'new UiSelector().className("android.widget.TextView").text("Continuar con Google")' ')')
class MainLocators: EMPEZAR = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.view.ViewGroup").childSelector(' 'new UiSelector().className("android.widget.TextView").text("Empezar")' ')') FEED_TAB = UiLocator(MobileBy.ACCESSIBILITY_ID, "Feed, tab, 1 of 4") BUSQUEDA_TAB = UiLocator(MobileBy.ACCESSIBILITY_ID, "Busqueda, tab, 2 of 4") CREAR_FEED_TAB = UiLocator(MobileBy.ACCESSIBILITY_ID, "Crear feed, tab, 3 of 4") USUARIO_TAB = UiLocator(MobileBy.ACCESSIBILITY_ID, "Usuario, tab, 4 of 4")
class DescripcionLocators: TITULO_ETXT = UiLocator( MobileBy.XPATH, "(//android.view.ViewGroup[android.widget.TextView[@text='Título']]" "/android.view.ViewGroup/android.widget.EditText)[1]") SINTESIS_ETXT = UiLocator( MobileBy.XPATH, "(//android.view.ViewGroup[android.widget.TextView[@text='Título']]" "/android.view.ViewGroup/android.widget.EditText)[2]") DESCRIPCION_ETXT = UiLocator( MobileBy.XPATH, "(//android.view.ViewGroup[android.widget.TextView[@text='Título']]" "/android.view.ViewGroup/android.widget.EditText)[3]")
class RegistroInfoLocators: USUARIO_EDITTEXT = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.widget.EditText").instance(0)') NOMBRE_EMPRESA_EDITTEXT = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.widget.EditText").instance(1)') EMAIL_EDITTEXT = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.widget.EditText").instance(2)') TELEFONO_EDITTEXT = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.widget.EditText").instance(3)')
class VistaPreviaLocators: TITULO_TXTVW = UiLocator( MobileBy.XPATH, "//android.widget.HorizontalScrollView/" "following-sibling::android.widget.TextView[1]") USUARIO_TXTVW = UiLocator( MobileBy.XPATH, "(//android.widget.ScrollView//android.view.ViewGroup//android.view.ViewGroup//android.widget.TextView)[3]" ) ETIQUETA_TXTVW = UiLocator( MobileBy.XPATH, "(//android.widget.ScrollView//android.view.ViewGroup//android.view.ViewGroup//android.widget.TextView)[5]" ) ZONA_TXTVW = UiLocator( MobileBy.XPATH, "(//android.widget.ScrollView//android.view.ViewGroup//android.view.ViewGroup//android.widget.TextView)[7]" ) SINTESIS_TXTVW = UiLocator( MobileBy.XPATH, "(//android.widget.ScrollView/android.view.ViewGroup/android.widget.TextView)[2]" ) DESCRIPCION_TXTVW = UiLocator( MobileBy.XPATH, "(//android.widget.ScrollView/android.view.ViewGroup/android.widget.TextView)[3]" ) PAGAR_BTN_TEMP = UiLocator( MobileBy.XPATH, "//android.view.ViewGroup[android.widget.TextView[@text='{modo}']]")
class InteresesLocators: INTERES_TEMP_VIEW = UiLocator( MobileBy.XPATH, '//android.view.ViewGroup[android.widget.TextView[contains(@text, "{texto}")]]' ) INTERES_SUBCATEGORIA_TEMP = UiLocator( MobileBy.XPATH, '//android.widget.ScrollView//android.view.ViewGroup//android.view.ViewGroup[android.widget.TextView' '[contains(@text, "{texto}")]]') ACEPTAR_BTN = UiLocator( MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().className("android.view.ViewGroup").childSelector(' 'new UiSelector().className("android.widget.TextView").text("Aceptar")' ')') INTERES_SELECCIONADO = UiLocator( MobileBy.XPATH, "//android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[android.widget.TextView[@text='1']]" )
class NuevaPublicacionLocators: SELECCIONAR_TIPO_TEMP = UiLocator( MobileBy.XPATH, "//android.view.ViewGroup[android.widget.TextView[@text='{texto}']]" "//android.view.ViewGroup")
class FotografiasLocators: IMAGEN_TEST_IMVW = UiLocator( MobileBy.XPATH, "(//android.view.ViewGroup[android.view.ViewGroup/android.widget.ImageView])" ) CROP_EDITAR_TXVW = UiLocator(MobileBy.ACCESSIBILITY_ID, "Crop")
def continuar(self): continuar_btn = UiLocator( MobileBy.XPATH, '//android.view.ViewGroup[android.widget.TextView[@text="Continuar"]]' ) self.t_single_tap(continuar_btn)
def guardar(self): guardar_btn = UiLocator( MobileBy.XPATH, '//android.view.ViewGroup[android.widget.TextView[@text="Guardar"]]' ) self.t_single_tap(guardar_btn)
def aceptar(self): aceptar_btn = UiLocator( MobileBy.XPATH, '//android.view.ViewGroup[android.widget.TextView[@text="Aceptar"]]' ) self.t_single_tap(aceptar_btn)
class ZonasLocators: ZONA_VIEW_TEMP = UiLocator( MobileBy.XPATH, '//android.view.ViewGroup[android.widget.TextView[contains(@text, "{texto}")]]' )