Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eptrade Playwright login client

This project logs in with Playwright, keeps a persistent Chromium profile, and leaves the browser on the logged-in page for internal automation tests and observation.

By default it does not bypass slider/captcha verification. For unattended relogin, prefer a server-side automation whitelist or internal login endpoint for the automation account. In an approved test environment, it can optionally run a configurable slider drag action after the login form is submitted.

Setup

npm install
cp .env.example .env

Edit .env:

  • EPTRADE_USERNAME
  • EPTRADE_PASSWORD
  • optional EPTRADE_KEEP_BROWSER_OPEN=1

Optional slider automation settings for test environments:

  • EPTRADE_SLIDER_AUTOMATION=1
  • EPTRADE_SLIDER_DISTANCE=180
  • EPTRADE_SLIDER_HANDLE_SELECTOR=.slider-button
  • EPTRADE_SLIDER_TRACK_SELECTOR=.slider-track

For the current Tianai slider, the script opens the verification panel, detects the puzzle target from the generated images, drags the slider, waits for 验证成功, and then submits the login form. If EPTRADE_SLIDER_DISTANCE is set, that fixed distance overrides image detection.

Run

npm start

The script:

  1. Opens https://www.eptrade.cn/ui-oss-portal/dashboard.
  2. Reuses .auth/eptrade-profile if it is already logged in.
  3. Otherwise fills the login form.
  4. Fails clearly if a slider challenge appears, unless EPTRADE_SLIDER_AUTOMATION=1 is enabled.
  5. Leaves the browser on the logged-in redirected page.
  6. Keeps the browser open by default so the page can be observed.

Debugging

Set EPTRADE_DEBUG_NETWORK=1 to print login and captcha network diagnostics.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages