Skip to content

Commit d14d718

Browse files
Merge branch 'botcity-dev:main' into fix/master/print_pdf_fix
2 parents 131eef3 + ef33bba commit d14d718

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

botcity/web/browsers/edge.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ def wait_for_downloads(driver):
115115
"""Wait for all downloads to finish.
116116
*Important*: This method overwrites the current page with the downloads page.
117117
"""
118-
if not driver.current_url.startswith("chrome://downloads"):
119-
driver.get("chrome://downloads/")
118+
if not driver.current_url.startswith("edge://downloads"):
119+
driver.get("edge://downloads/")
120120
return driver.execute_script("""
121-
var items = document.querySelector('downloads-manager')
122-
.shadowRoot.getElementById('downloadsList').items;
123-
if (items.every(e => e.state === "COMPLETE"))
124-
return items.map(e => e.fileUrl || e.file_url);
121+
var items = Array.from(document.querySelector(".downloads-list")
122+
.querySelectorAll('[role="listitem"]'));
123+
if(items.every(e => e.querySelector('[role="progressbar"]') == null))
124+
return true;
125125
""")

0 commit comments

Comments
 (0)