Keep LocalStorage

Đang mở
#2,968 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, node.js
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu với helper của Puppeteer và cấu hình được hiển thị, đặc biệt là cách keepBrowserState xử lý cookie và trạng thái trình duyệt giữa các kịch bản. Theo dõi nơi LocalStorage được đặt lại hoặc giữ lại; hoàn tất khi LocalStorage được duy trì giữa các bài kiểm thử liên quan theo cùng cách như cookie, với độ bao phủ cho hành vi đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What are you trying to achieve?

i want keep LocalStorage like keepCookies

What do you get instead?

Provide console output if related. Use --verbose mode 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
    }
  }
}
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
756
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codeceptjs/CodeceptJS

Tất cả issue của codeceptjs/CodeceptJS

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.