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

311
Visualizações
WebdriverIO saucelabs bug, browser.getUrl is refer to started url but not for current url

I'm faced with issue when my tests on remote (CI+saucelabs or local machine + saucelabs remote) are not the similar.

I have a site (e.g. example.com)

My scenario consists on next steps:

  1. open example.com
  2. click to "login" button
  3. fill form and click to "sign in"
  4. forms redirect to another site (e.g. example2.com)
  5. proceed working with another site

inside the step 5 - browser.getUrl() should refers to example2.com (on local execution without saucelabs it's true), but on saucelabs I get example.com.

env:

nodejs: 16.13.1

npm: 8.1.2

libs:

@wdio/cli: 6.10.11

@wdio/sauce-service: 6.3.6

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Without seeing more code it's hard to tell, but I suspect the problem is either timing related, or Selenium doing some weird caching.

(Sauce Labs acts as a proxy in this instance; It does nothing besides send commands to Selenium and relay responses back to your test runner.)

The network distance between a Sauce Labs browser and your SUT is going to be different than that between your local browsers and your SUT... especially if the SUT is located inside your corporate network. That makes me suspect there Sauce Labs browser may have to wait longer for your SUT to completely load, and the browser itself is telling Selenium it's on the wrong page still.

If you add a browser.waitUntil(browser.getUrl() === "desired_url", timeout), with a timeout of "30000", does your test start working? If so, it is a problem with the browser load time and you can either see what you can do to improve load time or just leave the wait in place.

I'd lower the timeout value after diagnosis though, to something more sensible.

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