Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

96
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda