Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

333
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!