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

343
Vistas
Can not Find Elements on the production Server, Selenium

this question might seem dumb but I am facing a problem regarding finding of elements in Facebook. The issue is I want to change the language of the user so I go to the tab to change language and there is a drop-down(dynamic as I read on internet) and you can change language but when you click on the drop-down and enter the class name (or id or xpath or selectors) it does not show that any element is present there, but when I inspect those elements , the code renders and then I can find the elements in the Dev Tools using the same class(id or xpath or selectors).

When I run the code in my local machine(uses remote browser), the bot goes to drop-down, clicks on it and executes the line to find the options of the drop-down, and it successfully finds the 114 options and clicks on the desired one but the main problem occurs when I want to use the same code on a production server (Scaleaway server and also remote browser), the length of the list of the elements find out to be zero and hence the code breaks.

URL to change Language of the account: https://www.facebook.com/settings/?tab=language

Details for Image : These are the HTML tags and code related to this drop down, only appears when I specifically inspect the element and box, but when I close the drop down and enter the same id or selector I inspected , I get no elements related to it , Selenium somehow does find through my local machine but fails with the server side code

languages = self.browser.find_elements_by_xpath(
            '//span[contains(@class,"d2edcug0 hpfvmrgz qv66sw1b c1et5uql lr9zc1uh 
            a8c37x1j fe6kdd0r mau55g9w c8b282yb keod5gw0 nxhoafnm aigsh9s9 d3f4x2em 
            iv3no6db jq4qci2q a3bd9o3v ekzkrbhg oo9gr5id hzawbc8m")]')
sleep(2)
print(f" Languages found: {len(languages)}")

I get length of the list as 114 through my local machine but 0 with server.

Can any one figure this out and how can I use Selenium to solve this issue ?

about 4 years ago · Santiago Trujillo
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