Keep LocalStorage
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- testing
Research direction
Start with the Puppeteer helper and the configuration shown, especially how keepBrowserState handles cookies and browser state between scenarios. Trace where LocalStorage is reset or retained; done means LocalStorage persists across relevant tests in the same way as cookies, with coverage for that behavior.
Written by the indexing model from the issue text.
Description
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
}
}
}
- Dominant language
- JavaScript
- Stars
- 4.2k
- Forks
- 756
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codeceptjs/CodeceptJS
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
codeceptjs/CodeceptJS#5420 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codeceptjs/CodeceptJS#5358 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
codeceptjs/CodeceptJS#4958 · 10 comments · 2 reactions ·
-
stale
Difficulty 1/5 Under an hour Newbie friendliness 72/100
codeceptjs/CodeceptJS#4778 · 3 comments ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 38/100
codeceptjs/CodeceptJS#5618 · 1 comment ·
All issues in codeceptjs/CodeceptJS
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100