Skip to content

Commit

Permalink
test account select slowdown
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxxRK committed Aug 22, 2024
1 parent 6594d48 commit b4709a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

setuptools.setup(
name="vanguard-api",
version="0.2.3",
version="0.2.4",
author="MaxxRK",
author_email="[email protected]",
description="An unofficial API for Vanguard Invest",
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",
url="https://github.com/MaxxRK/vanguard-api",
download_url="https://github.com/MaxxRK/vanguard-api/archive/refs/tags/v0.2.3.tar.gz",
download_url="https://github.com/MaxxRK/vanguard-api/archive/refs/tags/v0.2.4.tar.gz",
keywords=["VANGUARD", "API"],
install_requires=["playwright", "playwright-stealth"],
packages=["vanguard"],
Expand Down
5 changes: 3 additions & 2 deletions vanguard/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def place_order(
account_box.wait_for(timeout=10000)
account_box_interact = account_box.locator("..")
account_box_interact.click()
sleep(0.5)
account_selectors = account_box.locator("option").all()
for account in account_selectors:
if account_id in account.text_content():
Expand All @@ -117,11 +118,11 @@ def place_order(
quote_box.fill("")
quote_box.fill(symbol)
self.session.page.keyboard.press("Tab")
for _ in range(3):
for _ in range(6):
quote_price = self.session.page.wait_for_selector(
"(//div[@data-testid='txt-quote-value'])[2]", timeout=10000
).text_content()
sleep(1)
sleep(0.5)
if quote_price != "$—":
break
if quote_price != "$—":
Expand Down

0 comments on commit b4709a3

Please sign in to comment.