Skip to content

Commit

Permalink
Merge pull request #400 from MaxxRK/main
Browse files Browse the repository at this point in the history
fix fidelity place order
  • Loading branch information
NelsonDane authored Oct 14, 2024
2 parents ca62e95 + 7edae3b commit 98d7cf3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fidelityAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,9 @@ def transaction(
# If error occurred
try:
self.page.get_by_role(
"button", name="Place order clicking this"
"button",
name="Place order",
exact=False,
).wait_for(timeout=4000, state="visible")
except PlaywrightTimeoutError:
# Error must be present (or really slow page for some reason)
Expand Down Expand Up @@ -611,11 +613,13 @@ def transaction(
# If its a real run
if not dry:
self.page.get_by_role(
"button", name="Place order clicking this"
"button",
name="Place order",
exact=False,
).click()
try:
# See that the order goes through
self.page.get_by_text("Order received").wait_for(
self.page.get_by_text("Order received", exact=True).wait_for(
timeout=5000, state="visible"
)
# If no error, return with success
Expand Down

0 comments on commit 98d7cf3

Please sign in to comment.