Skip to content

Commit

Permalink
Fix Playwright extra tab on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-Jing committed Jun 14, 2024
1 parent 90fc308 commit cc668d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mitm.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ def __init__(self, width, height, mitm_port, majsoul_url):

print(f'startup browser success')

self.page = self.browser.new_page()
if self.browser.pages:
self.page = self.browser.pages[0]
else:
self.page = self.browser.new_page()

self.page.goto(majsoul_url)
# self.page.goto('https://game.mahjongsoul.com/')
Expand Down

0 comments on commit cc668d6

Please sign in to comment.