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

307
Vistas
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 Respuestas
Responde la pregunta

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 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