Skip to content

Commit dbc6437

Browse files
committed
Added wait after going to downloads page
1 parent b62372c commit dbc6437

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

botcity/web/browsers/edge.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import os
44
import tempfile
5+
import time
56
from typing import Dict
67

78
from msedge.selenium_tools import Edge, EdgeOptions # noqa: F401, F403
@@ -124,6 +125,7 @@ def wait_for_downloads(driver):
124125
"""
125126
if not driver.current_url.startswith("edge://downloads"):
126127
driver.get("edge://downloads/")
128+
time.sleep(1)
127129
return driver.execute_script("""
128130
var items = Array.from(document.querySelector(".downloads-list")
129131
.querySelectorAll('[role="listitem"]'));

0 commit comments

Comments
 (0)