Improvements
This commit is contained in:
parent
f6085aae21
commit
0e3a9d7ea2
9
check.py
9
check.py
|
@ -55,8 +55,8 @@ def run(playwright: Playwright) -> None:
|
||||||
context = browser.new_context()
|
context = browser.new_context()
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
|
|
||||||
# hr = HandleResponse()
|
hr = HandleResponse()
|
||||||
# page.on("requestfinished", hr.requestfinished)
|
page.on("requestfinished", hr.requestfinished)
|
||||||
|
|
||||||
re_month_name = re.compile(r"^([A-Z][a-z]+) (\d{4})$")
|
re_month_name = re.compile(r"^([A-Z][a-z]+) (\d{4})$")
|
||||||
|
|
||||||
|
@ -65,10 +65,11 @@ def run(playwright: Playwright) -> None:
|
||||||
|
|
||||||
page.get_by_role("textbox", name="Outbound").click()
|
page.get_by_role("textbox", name="Outbound").click()
|
||||||
month_row = page.get_by_role("row", name=re_month_name)
|
month_row = page.get_by_role("row", name=re_month_name)
|
||||||
month_and_year = month_row.inner_text()
|
month_and_year = month_row.inner_text().strip()
|
||||||
if month_and_year == "August 2023":
|
if month_and_year == "August 2023":
|
||||||
month_row.get_by_role("cell").nth(1).click()
|
month_row.get_by_role("cell").nth(1).click()
|
||||||
# page.get_by_role("row", name="August 2023").get_by_role("cell").nth(1).click()
|
else:
|
||||||
|
assert month_and_year == "September 2023"
|
||||||
page.get_by_role("cell", name="29").click()
|
page.get_by_role("cell", name="29").click()
|
||||||
|
|
||||||
page.get_by_role("textbox", name="Return").click()
|
page.get_by_role("textbox", name="Return").click()
|
||||||
|
|
Loading…
Reference in a new issue