Skip to content

Commit

Permalink
Merge pull request #29 from MaxxRK/deepsource-transform-d3f8e6b3
Browse files Browse the repository at this point in the history
style: format code with Black and isort
  • Loading branch information
MaxxRK authored Aug 2, 2024
2 parents 5e5705c + f6cd893 commit 6059397
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions vanguard/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,19 +202,25 @@ def place_order(
elif duration == "GOOD_TILL_CANCELLED":
self.session.page.click("xpath=//label/span[text()='60-day (GTC)']")
if order_type == "SELL":
cost_basis = self.session.page.locator("text=Choose a cost basis method").nth(0)
cost_basis = self.session.page.locator(
"text=Choose a cost basis method"
).nth(0)
cost_basis.wait_for(timeout=5000)
check_box = self.session.page.locator("text=Set as the preferred cost basis method for this holding.").nth(0)
check_box = self.session.page.locator(
"text=Set as the preferred cost basis method for this holding."
).nth(0)
check_box.locator("..").click()
continue_button = self.session.page.get_by_role("button", name="Continue")
continue_button = self.session.page.get_by_role(
"button", name="Continue"
)
expect(continue_button).to_be_visible(timeout=3000)
continue_button.click()
except (PlaywrightTimeoutError, AssertionError):
pass
try:
self.session.page.wait_for_selector(
"div.col-lg-6:nth-child(3) > twe-trade-detail:nth-child(2) > tds-card:nth-child(1) > div:nth-child(1) > tds-card-body:nth-child(1) > div:nth-child(3) > div:nth-child(1)",
timeout=5000
timeout=5000,
)
warning = self.session.page.get_by_text("errorBefore you can proceed").first
warning_header = warning.text_content()
Expand Down

0 comments on commit 6059397

Please sign in to comment.