[Fixed]-Javascript ajax request not running with Selenium tests

1👍

The issue was not with Selenium, but with Django. I had to use StaticLiveServerTestCase instead of LiveServerTestCase for testing, otherwise the static files would not load.
To test continuous Adjax request I had to add something like this:

wait = WebDriverWait(self.browser, timeout=30)

wait.until(EC.presence_of_element_located((By.ID, “element_id”)))

👤foobar

Leave a comment