fix: correct login() return value documentation in CLAUDE.md

- Fix return value from 2-tuple to 4-tuple (browser, context, page, main_frame)
- Correct function signature to match actual implementation
- Documentation now matches the actual API

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-03-27 12:50:44 +08:00
parent f0d21e62c9
commit 8d59fc6ef8

View File

@@ -40,10 +40,10 @@ Note: Test scripts are responsible for loading environment variables and passing
### Module Structure
**`utils/auth.py`** - Core authentication module (pure functions)
- `login(url, username, password, page)` - Handles Yonyou BIP login with automatic force-login popup detection. Requires all parameters explicitly.
- `logout(page)` - Performs logout with confirmation dialog handling
- Callers are responsible for browser lifecycle management (context.close(), browser.close())
- Returns tuple: `(page, main_frame)` where `main_frame` is the forwardFrame iframe
- `login(playwright, username, password, url, headless, ignore_https_errors, verbose=True)` - Handles Yonyou BIP login with automatic force-login popup detection. Requires all parameters (playwright, username, password, url, headless, ignore_https_errors).
- `logout(page)` - Performs logout with confirmation dialog handling.
- Returns tuple: `(browser, context, page, main_frame)` where `main_frame` is the forwardFrame iframe.
- Callers are responsible for browser lifecycle management (context.close(), browser.close()).
**`tests/`** - Test suite
- All test files must add `PROJECT_ROOT` to `sys.path` to import `utils` modules