Keep LocalStorage
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, node.js
- 领域
- testing
调研方向
从 Puppeteer helper 和所示配置入手,尤其关注 keepBrowserState 如何处理不同场景之间的 cookie 和浏览器状态。追踪 LocalStorage 在哪里被重置或保留;完成标准是 LocalStorage 在相关测试之间以与 cookie 相同的方式持久存在,并且有覆盖该行为的测试。
由索引模型根据 Issue 内容生成。
描述
What are you trying to achieve?
i want keep LocalStorage like keepCookies
What do you get instead?
Provide console output if related. Use
--verbosemode for more details.
My First Test --
test something
我 在页面 "https://....com/"
我 保存屏幕截图 "see-first.jpg"
我 看到 "text"
我 等 2
我 单击 "客户/广告主", ".ant-btn"
我 wait for navigation
我 等待元素 ".right", 5
我 单击 "账号登录", ".right"
我 单击 "密码登录", ".TabR"
我 填写字段 "#Authorize_username", "...@sina.com"
我 填写字段 "#Authorize_password", "123456"
我 单击 "立即登录", ".ant-btn-primary"
我 等 5
我 保存屏幕截图 "see-chengfayun.jpg"
✔ OK in 14313ms
Provide test source code if related
// paste test
Feature('My First Test');
Scenario('test something', ({ I }) => {
I.amOnPage('https://....com/');
I.saveScreenshot("see-first.jpg")
I.see('text');
I.wait(2);
I.click('客户/广告主', '.ant-btn');
I.waitForNavigation();
I.waitForElement('.right', 5);
I.click('账号登录', '.right');
I.click('密码登录', '.TabR');
I.fillField('#Authorize_username', '...@sina.com');
I.fillField('#Authorize_password', '123456');
I.click('立即登录', '.ant-btn-primary');
I.wait(5)
//截图
I.saveScreenshot("see-chengfayun.jpg")
});
Details
- CodeceptJS version: 3.0.7
- NodeJS Version: v14.16.1
- Operating System: macos
- puppeteer
- Configuration file:
# paste config here
exports.config = {
tests: './*_test.js',
output: './output',
helpers: {
Puppeteer: {
url: 'http://localhost',
show: true,
windowSize: '1200x900',
keepBrowserState: true,
}
},
include: {
I: './steps_file.js'
},
bootstrap: null,
mocha: {},
name: 'PuppeteerTests',
translation: 'zh-CN',
plugins: {
pauseOnFail: {},
retryFailedStep: {
enabled: true
},
tryTo: {
enabled: true
},
screenshotOnFail: {
enabled: true
}
}
}
- 主要语言
- JavaScript
- 星标
- 4.2k
- 派生
- 756
- 平均合并
- 2 天 9 小时
- 30 天内合并 PR
- 16
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codeceptjs/CodeceptJS 的其他 Issue
-
stale
难度 2/5 1-3 小时 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 条评论 ·
-
stale
难度 2/5 1-3 小时 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 条评论 ·
-
stale
难度 2/5 1-3 小时 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 条评论 · 2 个 reaction ·
-
stale
难度 1/5 1 小时以内 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 条评论 ·
-
stale
难度 4/5 3-5 天 新手友好度 38/100
codeceptjs/CodeceptJS#5618 · 1 条评论 ·
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
nightscout/nocturne#1414 ·
-
bug v2
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 条评论 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
难度 2/5 1-3 小时 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·