Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

97
Vistas
How to click on webview button in Android Esspresso Kakao test

I have an html form outside my android app which part looks like this:

<form action="https://cards-accept.bm.pl/secure_back/play/AW2E8CY8ZG" method="POST"><div class="form-row"><label for="PaRes" data-trans="PaRes"></label><div class="form-field"><textarea id="PaRes" name="PaRes" rows="10" cols="54">&lt;dummy pareq&gt;</textarea></div></div><div class="form-row"><label for="MD">MD</label><div class="form-field"><input type="text" name="MD" id="MD" value="29cdce57-e7a1-475f-8243-b141bb2e162f" autocomplete="off"></div></div><div class="tac"><button type="submit" class="btn dark"><span>SUBMIT</span></button></div></form>

I need to click on the button SUBMIT in my test. I have tried to achive that by this code, but failed:

      onScreen<MyScreen> {
            webView {
                withElement(Locator.CLASS_NAME, "btn dark") {
                    click()
                }
            }
        }

I have an exception as below:

java.lang.RuntimeException: java.lang.RuntimeException: Error in evaluationEvaluation: status: 32 value: {message=Compound class names not permitted} hasMessage: true message: Compound class names not permitted

Is there a way to click on the SUBMIT button in the other way?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

using space in class names is not permitted. Space is used to assign multiple classes to a single element.

change the button class name like this:

<button type="submit" class="btn_dark">

and the java code to this:

  onScreen<MyScreen> {
            webView {
                withElement(Locator.CLASS_NAME, "btn_dark") {
                    click()
                }
            }
        }
about 4 years ago · Juan Pablo Isaza Denunciar

0

To resolve my issue is to use TAG_NAME, as fortunately, I have only one button tag in this html present

     onScreen<MyScreen> {
            webView {
                withElement(Locator.TAG_NAME, "button") {
                    click()
                }
            }
        }
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda