Closed
Description
What are you trying to achieve?
A screenshot should be done after each step in the scenario - there are 4 steps in the scenario, so the screenshot should display a result after each of those 4 steps.
What do you get instead?
All screenshots are done at the very beginning of the test.
E.g. you can't see there filling of the text in the search field or a result of the search query:
record.zip
Provide console output if related. Use
--verbose
mode for more details.
$ codeceptjs run --verbose
***************************************
nodeInfo: 18.20.3
osInfo: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
cpuInfo: (16) x64 AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
chromeInfo: 126.0.6478.114
edgeInfo: "N/A"
firefoxInfo: undefined
safariInfo: N/A
If you need more detailed info, just run this: npx codeceptjs info
***************************************
CodeceptJS v3.6.4 #StandWithUkraine
Using test root "/home/mirao/workspace/tmp"
Helpers: Playwright
Plugins: screenshotOnFail, stepByStepReport, tryTo, retryFailedStep, retryTo, eachElement
StepByStep --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
test something
› Screenshot is saving to /home/mirao/workspace/tmp/output/record_c207c723ddc6ff2089642ffbbf5963a68a859f6ffd2558cea60869b5d0bf7dfa/0000.png
› Screenshot is saving to /home/mirao/workspace/tmp/output/record_c207c723ddc6ff2089642ffbbf5963a68a859f6ffd2558cea60869b5d0bf7dfa/0001.png
› Screenshot is saving to /home/mirao/workspace/tmp/output/record_c207c723ddc6ff2089642ffbbf5963a68a859f6ffd2558cea60869b5d0bf7dfa/0002.png
› Screenshot is saving to /home/mirao/workspace/tmp/output/record_c207c723ddc6ff2089642ffbbf5963a68a859f6ffd2558cea60869b5d0bf7dfa/0003.png
I am on page "https://codecept.io"
I fill field "#algolia-search-input", "Step by Step"
I press key "Enter"
I see element "#stepbystepreport"
✔ OK in 1688ms
OK | 1 passed // 2s
◉ Step-by-step preview: file:///home/mirao/workspace/tmp/output/records.html
Provide test source code if related
Feature('StepByStep');
Scenario('test something', ({ I }) => {
I.amOnPage("https://codecept.io")
I.fillField("#algolia-search-input", "Step by Step")
I.pressKey("Enter");
I.seeElement("#stepbystepreport");
});
Details
- CodeceptJS version: 3.6.4
- NodeJS Version: 18.20.3
- Operating System: Ubuntu 22.04
- Playwright 1.44.1
- Configuration file:
import { setHeadlessWhen, setCommonPlugins } from '@codeceptjs/configure';
// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);
// enable all common plugins https://github.com/codeceptjs/configure#setcommonplugins
setCommonPlugins();
export const config: CodeceptJS.MainConfig = {
tests: './*_test.ts',
output: './output',
helpers: {
Playwright: {
browser: 'chromium',
url: 'http://localhost',
show: true
}
},
plugins: {
stepByStepReport: {
enabled: true,
deleteSuccessful: false,
},
},
include: {
I: './steps_file'
},
name: 'tmp'
}
Metadata
Metadata
Assignees
Labels
No labels