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

115
Visualizações
Can't interact with web elements in second browser tab in Webdriver.io

I just found this issue and didn't find any topic or solution related to this problem anywhere. When a second browser tab is opened (the new tab is automatically focused) I can not interact with any web elements because Webdriver.io is searching for the respective element in the DOM tree of the first browser tab. I thought if I change focus with browser.switchWindow() to the first tab and then focus on the second again will fix the issue but didn't. I couldn't find a workaround or solution for this problem.

The code below represents my approach.

Given(/^Test given$/, async () => {
    await browser.url("https://www.google.com/?client=safari");
    await browser.newWindow("https://www.facebook.com");
    await $("facebook element selector").click();
});
about 4 years ago · Juan Pablo Isaza
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