diff --git a/main.py b/main.py index ed7575c..f962ed9 100644 --- a/main.py +++ b/main.py @@ -23,8 +23,16 @@ executor.submit(listener.network.network_listener, tab) tab.get(url='http://127.0.0.1:24613') -tab.change_mode() +tab.wait.url_change(text="/auth/login", timeout=3, raise_err=False) + +if tab.url.endswith("/auth/login"): + tab.wait.doc_loaded() + tab.actions.move_to("@@t()=input@@type=text").click().type("shikong") + tab.actions.move_to("@@t()=input@@type=password").click().type("123+AbC") + tab.actions.move_to("@@t()=button@@text():登录").click() + +tab.change_mode() items = tab.eles("t:body") for item in items: