Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Added wait after going to downloads page #57

Merged
merged 2 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions botcity/web/browsers/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os
import tempfile
import time
from typing import Dict

from msedge.selenium_tools import Edge, EdgeOptions # noqa: F401, F403
Expand Down Expand Up @@ -124,6 +125,7 @@ def wait_for_downloads(driver):
"""
if not driver.current_url.startswith("edge://downloads"):
driver.get("edge://downloads/")
time.sleep(1)
return driver.execute_script("""
var items = Array.from(document.querySelector(".downloads-list")
.querySelectorAll('[role="listitem"]'));
Expand Down
4 changes: 2 additions & 2 deletions docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pygments
mkdocs
mkdocstrings
mkdocstrings[python-legacy]>=0.18
mkdocs-material
livereload
livereload