From 16890c33db83c734b9ec644cd55067d7b9a8de0c Mon Sep 17 00:00:00 2001 From: matthew55 <78285385+matthew55@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:31:41 -0400 Subject: [PATCH] Fix Tornado page not fully loading --- tornadoAPI.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tornadoAPI.py b/tornadoAPI.py index e3f78c73..ed1df371 100644 --- a/tornadoAPI.py +++ b/tornadoAPI.py @@ -306,7 +306,7 @@ def tornado_transaction(Tornado_o: Brokerage, orderObj: stockOrder, loop=None): ) print("Completed all transactions, Exiting...") - killSeleniumDriver(driver) + killSeleniumDriver(Tornado_o) def handle_buy(driver, stock, orderObj, loop): @@ -370,6 +370,7 @@ def handle_buy(driver, stock, orderObj, loop): return try: + sleep(3) buy_power = driver.find_element(By.XPATH, buy_power_xpath).text.strip() cost = driver.find_element(By.XPATH, current_price_xpath).text.strip()