I am trying to use Selenium to download a file by clicking a "Query" button and then a "Download" button. The "Download" button is not available until the "Query" button is clicked. I am able to locate and click the "Query" button but I get an error no matter what find_element method I use when trying to find the "Download" button. Also, the id of the "Download" button is dynamic, so it cannot be identified by ID.
Query Button:
<button type="submit" class="btn mt-5 btn-primary btn-md">Query</button>
Download Button:
<div data-v-38979de7="" id="export_1659030977844" class="btn btn-info"> Download </div>
driver.implicitly_wait(3)
driver.find_element("xpath", './/button[@class="btn mt-5 btn-primary btn-md"]').click
driver.implicitly_wait(3)
driver.find_element("xpath", './/div[@class="btn btn-info"]')
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":".//div[@class="btn btn-info"]"}