I want to parse a list of records from webpage. The problem is that the records load through AJAX calls and are shown not simultaneously.
In order to archieve "wait till some record loads", I'm trying to use:
items = WebDriverWait(self.driver, 2).until(
EC.presence_of_all_elements_located((By.CSS_SELECTOR, '.editablesection')
)
But it check only the presence of first .editablesection
, not presence of all of them.
I tried to use .editablesection:nth-of-type({item_ind})
, but my selector is a bit more complicated than that, and I think it's not really possible to use :nth-of-type()
here.
At the time of check I have item_ind
variable that contains index of .editablesection
which I'm interested in now. Can I somehow specify a number of elements to wait in check_presence()
?