-1

I am running python selenium in a Raspberry Pi, which has poor and limited memory and cpu resources.

Sometimes it is able to load the page below, sometimes it does not (I don't know why sometimes yes and sometimes not).

Can I do something to actually force to load the page?

I've already tried to do something like:

wait = WebDriverWait(driver, 10)
wait.until(EC.visibility_of_element_located(("xpath", '//div[contains(@class, "DraftEditor-root")]')))

or something like

driver.implicitly_wait(20)

but it NEVER loads the page. Even if I go out from home and then come back after hours the browser hasn't load that part of page (the below part).

I even manually scrolled below or clicked something below to "force" to load that part, but it does nothing.

Is there something I can do to fix this problem due to poor ram and cpu resources?

Allexj
  • 1,375
  • 6
  • 14
  • 29
  • Does it have to be loaded with Chrome? Firefox might use less RAM depending on the page itself. Some of the switches mentioned in https://stackoverflow.com/questions/66825943/how-to-reduce-chromedriver-cpu-usage-in-selenium-python and https://stackoverflow.com/questions/55072731/selenium-using-too-much-ram-with-firefox might help. In my personal experience `--window-size=320,240` can help with very low RAM and limited CPU allocation. – Martheen Aug 14 '23 at 09:28
  • if you're sure it's ram/cpu performance that is the culprit I would try using HTMLUnit and see how it goes. You might try/catch the get() call the see if a timeout is thrown here. – pcalkins Aug 14 '23 at 17:20

0 Answers0