SuperAPI AI 工具集

iblai-screenshot

通用与其它

查看项目

更新于 10-16 05:56

技能介绍

用途:为 ibl.ai 应用生成应用商店列表、文档和营销用截图,覆盖 Web、iOS 和 Android。所有截图都需先登录,以捕获真实应用而非登录页。

Web 截图(Playwright):先在 e2e/.env.development 设置 PLAYWRIGHT_USERNAME 与 PLAYWRIGHT_PASSWORD;运行 iblai builds screenshot 生成 e2e/screenshots.spec.ts,含 iPhone、iPad、Android Phone、Android Tablet、Apple Watch、Desktop 等视口预设。生成的 spec 需先认证,项目 e2e/auth.setup.ts 会自动登录并保存状态到 playwright/.auth/。在 spec 中使用 storageState: "playwright/.auth/user-setup-chromium.json",先运行 pnpm exec playwright test e2e/auth.setup.ts --project=setup-chromium,再运行 pnpm exec playwright test e2e/screenshots.spec.ts;也可在 playwright.config.ts 中配置依赖 setup 的 screenshots 项目。可用 iblai builds screenshot --pages / /profile /notifications /analytics 自定义页面。启动 pnpm dev 后运行,截图保存到 screenshots/<device-slug>/<page-name>.png。可用 SCREENSHOT_BASE_URL 指定自定义地址。

iOS 截图(Xcode 模拟器):需已初始化 Tauri iOS 项目(iblai builds ios init)并安装 Xcode 模拟器。运行 iblai builds ios dev,首次在模拟器 WebView 中登录(SSO,必要时点 Continue with Password),会话会持久保存。用 screencapture -l $(osascript -e 'tell app "Simulator" to id of window 1') 捕获含标题栏的窗口。App Store Connect 所需尺寸包括 6.9"、6.3"、6.7"、6.5"、5.5" iPhone 及 12.9"、11" iPad,可用批处理脚本遍历模拟器。

Android 截图(模拟器):需已初始化 Tauri Android 项目(iblai builds android init)并配置 Android Studio 模拟器。运行 iblai builds android dev,首次登录后会话持久。macOS 用 screencapture 捕获 qemu-system-aarch64 窗口,Linux 用 xdotool。Google Play 所需尺寸包括 Pixel 8、Pixel 8 Pro、Nexus 7、Pixel Tablet,可用批处理脚本遍历 AVD。

限制:所有平台均需先登录;iOS/Android 需先安装应用;具体收费、价格、平台支持范围等资料暂未提供。