I clean the website, www.lipperleaders.com . I want to get funds from Singapore. I successfully implemented a drop-down list and retrieved the contents of the first page that appeared after sending the parameters. But when I try to go to the next pages (making the code by pressing the next button), I get an error message 'Element is no longer attached to the DOM'.
My code is about 100 lines, but I can give a general idea of the flow of execution of my code:
...
def main():
...
result = find_elements_by_tag_name('span')
...
driver.find_element_by_id("ctl00_ContentPlaceHolder1_ucDataPager_btnNext").click()
main()
main()
This code works fine for the first page, but when main()called again after pressing the next button. Before this recursive method, I also tried to put this inside a loop, and then the same error.
And if I write the same code as:
result = find_elements_by_tag_name('span')
driver.find_element_by_id("ctl00_ContentPlaceHolder1_ucDataPager_btnNext").click()
driver.find_element_by_id("ctl00_ContentPlaceHolder1_ucDataPager_btnNext").click()
.
.
- , , . driver.find_element_by_id().click() 500 , , . , .
, , .