CodeceptJS is a modern end to end testing framework with a special BDD-style syntax. The test is written as a linear scenario of user's action on a site. The use of generator functions allows asynchronous tests to be written in synchronous way.
Questions tagged [codeceptjs]
251 questions
1
vote
1 answer
Multiple Step definition files with Codecept Gherkin
I'm currently working with a Codecept's Gherkin framework. At the moment my step definition file is huge (1000+ lines) and I want to break it down to smaller, more maintainable chunks but I haven't been able to find a way of doing with codecept and…

theodoros
- 13
- 2
1
vote
2 answers
How do I click an Ionic back button in Codeceptjs?
I'm trying to use CodeceptJS to click a back button generated in Ionic and whatever I try, I can't get it to work. I think it may be related to #shadow-root.
First, here's the HTML generated by Ionic:

Patrick Kenny
- 4,515
- 7
- 47
- 76
1
vote
0 answers
How do I wait for a page to transition after checking the link?
I'm trying to get CodeceptJS to wait for a page to load after clicking a link, but I can't get it to do so gracefully.
My Ionic pages:
Homepage

Patrick Kenny
- 4,515
- 7
- 47
- 76
1
vote
1 answer
How can I locate a parent of an element know by child value using CodeceptJS
basically I have the following:
I want to locate…
title 1
title 2
title 3

JacobBrown2019
- 85
- 2
- 4
- 10
1
vote
1 answer
Codeceptjs - Headless chrome - stepByStepReport enabled - I.switchToNextTab() hangs when the new tab opens a PDF file
"codeceptjs": "^3.0.2"
"@wdio/selenium-standalone-service": "^6.8.0"
"webdriverio": "^6.8.0"
Sample code:
I.amOnPage("https://www.pdfpdf.com/samples.html");
I.click('//a[@href="samples/Sample2.PDF"]');
I.switchToNextTab();
I.closeCurrentTab();
When…

Sarath Babu V S
- 21
- 4
1
vote
3 answers
Codeceptjs Locator Builder - is there a way to do contains comparison with withAttr?
I was trying to use Locator Builder (https://codecept.io/locators/#locator-builder) and noticed that when I use withAttr, it does a equal comparison
Ex: locate('a').withAttr({href: '/order/offer/'})
Translates to:
.//a[@href = '/order/offer']
I was…

Sarath Babu V S
- 21
- 4
1
vote
1 answer
Error running Scenario please specify package correctly: "../null" file not found - Cucumber/CodeceptJs/IntelliJ
I'm trying to run a very basic Cucumber/CodeceptJs feature file but am getting this Error running Scenario please specify package correctly: "../null" file not found message and not sure what to do as very new to this tool. If I can have any help to…

Francislainy Campos
- 3,462
- 4
- 33
- 81
1
vote
1 answer
Have to use manual wait() to get CodeceptJS/Puppeteer custom helper to see table(td tr)
I have a codeceptjs/puppeteer project and am building a custom helper for accessing information in tables. I have been able to make this work, but only by putting a two second wait in my test step before calling on the async function in my custom…

bboursaw73
- 1,128
- 2
- 13
- 26
1
vote
2 answers
Does iterating table rows via Codeceptjs and Puppeteer require a Helper
I am trying to use the methods available within Codeceptjs to simply iterate rows of a table and select a row based on text existing in a particular cell of the current row being iterated.
The following code is in one of my page objects and…

bboursaw73
- 1,128
- 2
- 13
- 26
1
vote
1 answer
Include: dependency injection CodeceptJS/Puppeteer - Missing something?
I am clearly missing something related to dependency injection with CodeceptJS and Puppeteer. I am attempting to follow the docs but not yet successful.
Goal: Create a page object class, access the methods in that page object class from my test…

bboursaw73
- 1,128
- 2
- 13
- 26
1
vote
1 answer
Setting up and configuring Faker Js for CodeceptJs
really having trouble with setting up and configuring faker to work on codeceptjs, I have had a look at their website but no luck with the set up.
I just need need a simple example of faker within a test case.
I have installed through npm 'rosie'…

redoptics
- 65
- 6
1
vote
1 answer
Codeceptjs not able to scroll/swipe down without using an element
I am not able to swipe /scroll down in an Android application, I am using codeceptjs and following method but this method will act only on the visible element but I need to scroll down to the bottom of the page /on a specific element without using…

Siddesh VSM
- 71
- 7
1
vote
1 answer
gratAttributeFrom() method is not returning value. It returns only object,promise
How to get value using grabAttributeFrom in codecept. It returns only object,promise. How to get the attribute value from it.
let userid_xpath = await…

Niranjani Ravikumar
- 23
- 3
1
vote
1 answer
How to call a customhelper in CodeCeptjs?
How to call a method defined in customhelper?
MycustomHelper
const { Helper } = codeceptjs;
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
const expect = chai.expect;
class MyHelper…

Niranjani Ravikumar
- 23
- 3
1
vote
1 answer
Playwright parallel execution is not working with BDD tests (But it is working without BDD)
I am working with Playwright run-workers for parallel execution in chromium and sample BDD script when executed, i found Playwright is executing same scenario multiple times in different browser instances.
Ex: I created TWO simple BDD scenarios and…