android / android/android-test

webClick with onWebView API not working for a anchor tag element

Abierto
#802 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
1.2k
Forks
342
Merge medio
11 h 29 min
PR fusionados (30 d)
2

Descripción

### Description

- Currently working a test case which initiates a click on an anchor tag with href. Using the XPATH which points to the anchor tag and then performing the webclick. This is not working as of now. Verified the XPATH to get the text associated, which was correct as same as the text of anchor tag.
- Tried using the XPATH, CSS selector and a JavaScript(Which works on chrome console).

### Steps to Reproduce
get an HTML page which holds an Anchor tag Link To Google Try to get the XPATH. Use below code.

onWebView().withElement(findElement(Locator.XPATH, "PATH to Anchor ")).perform(webClick())
### Expected Results
- Initiate the click and open the link in web view as suggested by target
### Actual Results
- No action performed or error thrown.
### AndroidX Test and Android OS Versions
Espresso-web - 3.1.0
Android OS API 28
Espresso version - '3.3.0'
### Link to a public git repo demonstrating the problem:
https://stackoverflow.com/questions/64827652/how-can-we-click-on-html-anchor-with-href-using-android-espresso-webview-library

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with the provided onWebView().withElement(...).perform(webClick()) reproduction and the Espresso-web webClick API. Verify the behavior against an anchor element with an href on Android API 28, then add or update a regression test if the relevant test location can be identified. Done means the anchor click opens its target in the WebView without an error.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
android, java
Área
mobile, testing
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.