MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / login

Method login

scripts/website/syndicate_browser_posts.py:301–309  ·  view source on GitHub ↗
(self, page)

Source from the content-addressed store, hash-verified

299 return post.date.weekday() == 4
300
301 def login(self, page) -> None:
302 page.goto(self.LOGIN_URL, wait_until="domcontentloaded")
303 _find_first(page, self.USER_SELECTORS).fill(os.environ["FOOJAY_USER"])
304 _find_first(page, self.PASSWORD_SELECTORS).fill(os.environ["FOOJAY_PASSWORD"])
305 _find_first(page, self.SUBMIT_SELECTORS).click()
306 try:
307 page.wait_for_url("**/wp-admin/**", timeout=90000)
308 except Exception: # noqa: BLE001
309 page.wait_for_selector("#wpadminbar", timeout=30000)
310
311 def submit_draft(self, page, ctx: AdapterContext) -> dict[str, Any]:
312 # Land on wp-admin so wpApiSettings (which carries the nonce) is in scope.

Callers 2

invoke2Method · 0.45
run_adapterFunction · 0.45

Calls 3

_find_firstFunction · 0.85
fillMethod · 0.65
clickMethod · 0.65

Tested by

no test coverage detected