Questions tagged [codeceptjs]

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

Node script codeceptjs execution problem with hand over argument

In a node script (or outside, direct in the command) I want to add an custom argument as a flag to trigger different behaviour. By adding this argument it would be taken, if there is no argument the ...
elute's user avatar
  • 1
0 votes
0 answers
24 views

Execute an async function before scenario triggers on codeceptjs

I am wanting to run a async function which will fetch the data for testing. This data is then passed to Data() hook in codeceptjs. I have tried hooks and event listeners like "Before(), ...
Lakshit Kothari's user avatar
0 votes
1 answer
16 views

How to go to Device home or runInBackground on IOS platform using Codeceptjs

I am using Codeceptjs framework with Appium helper for my UI automation. I want to go to Device home on IOS platform and then navigate back to App. I am using browserstack to run my scripts. I have ...
anusha's user avatar
  • 1
0 votes
0 answers
18 views

Enable mocha-junit-reporter in a custom runner

So, when running commands with codeceptjs you can pass the --reporter flag and then the type: codeceptjs run --reporter mocha-junit-reporter --steps I have had to make a custom runner for some out of ...
Daniel Dmytrasz's user avatar
0 votes
0 answers
23 views

How can I take the screenshot of the session where the test failed instead of default session in CodeceptJs

I've been juggling around taking the screenshot of the correct session in CodeceptJs but it always take the screenshot of the default session. I need to post the screenshot to the allure report. It ...
Vatsal Chavda's user avatar
0 votes
0 answers
51 views

How can I write a mock for GraphQL subscriptions/websockets using CodeceptJS?

if we have http reqest we write mock like this this.mockRoute( 'https://<endpoint>*', (route) => { route.fulfill({ status: 200, json: ...
user497202's user avatar
0 votes
0 answers
31 views

How to use puppeteer inside codecept?

I currently have a Jest + Puppeteer file where I retrieve the email from [https://temp-mail.org/es/ ] and click on the link of the mail received. This was only possible by using the StealthPlugin from ...
Jesus Rodriguez Santos's user avatar
0 votes
0 answers
47 views

NodeJs Codeception Docker: Cannot find module ‘chromedriver’ Image codeception/codecepjs 2.0.4

I had Electron 1.7.5 running the tests with the codeception/codecepjs 1.0.1 image and chromedriver 2.38.3 normal but when I updated to electron 3.1.13 it started to break the tests. I updated the ...
alefecarv's user avatar
2 votes
1 answer
201 views

Why is my intellisense not working in VS Code for CodeceptJS using playwright?

I am trying to create a practice environment for CodeceptJS using TS and Playwright, but for some reason VSCodes intellisense refuses to show any suggestions. I can manually type the code and that is ...
HermanCodes's user avatar
0 votes
0 answers
149 views

Codeceptjs returns NS_ERROR_CONNECTION_REFUSED when running tests via Github actions

I'm making e2e tests with Codeceptjs (Playwright) and tests work as intended locally. But as soon as I move tests to Github actions runner, they fail completely (the first one dies, and then the job ...
Liondalan's user avatar
0 votes
0 answers
30 views

Failing to convert test coverage jsons to istanbul format

What are you trying to achieve? I am trying to get the code coverage for my project which I keep my e2eTest project within. I am going according to the documentation: capturing code coverage. After I ...
Buğrahan Durukan's user avatar
0 votes
0 answers
144 views

Running "npx codecept-ui" gives this error in vs code terminal - ⚠️You have to build Vue application by `npm run build`

Running gives this error in vs code terminal - ⚠️You have to build Vue application by npm run build PS C:\Users\91917\Downloads\DrySign\Codecept> npm run build npm ERR! Missing script: "build&...
Kartik Hindole's user avatar
1 vote
1 answer
62 views

How to set up CodeceptJS in a monorepo

I am using a pnpm workspace with different packages to distinguish the modules. I intend to use CodeceptJS as my test automation framework but whenever I install and initialize CodeceptJS in the root ...
Lewis Munene's user avatar
0 votes
0 answers
13 views

Codeceptjs - knowing test progress while they are running

I have codeceptjs tests written in BDD format (Scenarios with tags). I have clubbed tests into few groups (based on tags) and run them in parallel in Travis Currently, I get the report after all tests ...
Sarath Babu V S's user avatar
0 votes
1 answer
54 views

Codeceptjs - BDD approach - Before all scenarios are run

I have codeceptjs tests written in BDD format (Scenarios with tags). I have clubbed tests into few groups (based on tags) and run them in parallel in Travis I would like to run a set of browser ...
Sarath Babu V S's user avatar
0 votes
0 answers
26 views

How do I unblock Firefox cookies with Codeceptjs?

I want to do E2E testing of Salesforce in codeceptjs using the latest version of Firefox (as of March 2023), however operations that were possible with the old version of Firefox (84.0.2) cannot be ...
Watanabe's user avatar
0 votes
0 answers
33 views

How do automate the ability to click the url in codecept?

How can I AUTOMATE a simple clicking of the url within the browser? tried using I.amOnPage() & I.appendField(URL, "google.com"); **Expected results: ** When you do this manually it ...
KeepMyselfHumble's user avatar
1 vote
1 answer
147 views

How to exit the process after all tests are run

I have the same problem https://github.com/codeceptjs/CodeceptJS/issues/2573 , but it's answer with mocha: { bail: true }, doesn't work for me. Codeceptjs runs all tests and printing an end result ...
Alena Sapronova's user avatar
0 votes
0 answers
66 views

Puppeteer and CodeceptJS 3.3: I.scrollTo() behaves differently than CodeceptJS 3.2

I am trying to use Puppeteer 18.1+ because older versions are no longer supported and I'm hoping it might fix the memory leaks I'm seeing. Apparently, I can't use CodeceptJS 3.2 with Puppeteer ...
Terris's user avatar
  • 887
1 vote
0 answers
81 views

How do i get text from shadow root when e2e testing with codecept-puppeteer?

This is my HTML Structure I want to make sure that the title is 'Favorite Restaurant', How do i test this using codecept-puppeteer ? I already tried this, but it doesn't work Feature('Favorite ...
Dapa's user avatar
  • 11
0 votes
1 answer
107 views

Nothing happens when using I.attachFile to upload a document

Is a drag-and-drop field required for the I.attachFile('element', 'filePath') to work? Because currently nothing happens when I try using the attachFile method. No error message or any issues ...
Newbie10's user avatar
0 votes
1 answer
293 views

Intellisense not working for Playwright, REST

I write autotests on the Codeceptjs framework in TypeScript. After adding additional modules to the project, as well as after updating the repository with the command: npx codeceptjs def Intellisense ...
jeow's user avatar
  • 1
0 votes
0 answers
187 views

how to implement "beforeAll", "afterAll" or "afterEach" in gherkins with the framework CodeceptsJS with Playwright

I am using the framework CodeceptsJS with Playwright (https://codecept.io/playwright/) and I saw in the website that the tag "Background" is the "beforeEach", but I do not find out ...
Luis's user avatar
  • 1
0 votes
0 answers
68 views

How can I write an if/else loop that searches for an newRecord in a table and clicks it, or goes to the next page?

Scenario: I'm using CodeceptJS to automate: creating a new record on a table (paginates on 20 records) searching the table for the record if the record can be found on the first page, click it else ...
Adam's user avatar
  • 1
0 votes
2 answers
155 views

Click on first element contained in a div

I have a div that contains a set of dynamic elements. I want to click on the first search result. I want to click on the first element contains in I tried using creating a custom xPath like so but ...
theodoros's user avatar
0 votes
0 answers
79 views

Disable automatic browser session on running E2E Test for CodeceptIO

I am using Codecept with Playwright. The problem I am experiencing is that whenever I start my E2E Test, there is a default browser session launched. Is there a way to disable this default browser ...
A Hassan's user avatar
  • 119
1 vote
0 answers
227 views

Unable to run CodeceptJS/Playwright test in a dockerized container - err: qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped

I have a CodeceptJS/Playwright test framework which we want execute to in a Dockerized container. We have tried to implement the same using various base images but when execution starts we get Here ...
souvikd's user avatar
  • 31
0 votes
0 answers
22 views

Captures the traces for different session actions as well

Our application is just like google meet in which we have to place the real time call and video. We are using codecept to automate our application. We are using traces to track all failures. However ...
Meenu Garg's user avatar
1 vote
3 answers
1k views

I need to use Appium 2 for CodeceptJS mobile tests

Because latest iOS is making problems with Appium 1.x, Appium team is no longer supporting it, and Appium 2 is working ok - I need to use v2... CodeceptJS 3.3.x is using Appium 1.x now and because of ...
Dimitar Hristovski's user avatar
0 votes
1 answer
100 views

Appium - Codeceptjs - Gherkin, can not execute steps script and config failed

I've got some issues with codeceptjs appium. I run test script by npx codeceptjs run , it did not execute the step_definitions file. I config steps definition with /*steps.js and its not working, i ...
Hoang Nguyen's user avatar
0 votes
0 answers
105 views

Make sure the correct deployment target has been selected for its compilation in Xcode

I am using the following desiredCapabilities in my codeceptconf.js file. Appium: { // IOS local Simulator iPhone 13 app: "./ipa/arvApp.app", platform: "iOS", ...
Bhupendra Singh Rautela's user avatar
0 votes
1 answer
301 views

try catch in Codeceptjs with playwright

This code, i am running in my page class I.fillField ("input[@class='test']", "name"); } catch(error){ console.log("Error is occured"); I.refreshPage(); } If script is ...
Meenu Garg's user avatar
1 vote
0 answers
57 views

Appium CodeceptJS - Mock sound recording - Android

I've been automating testing of mobile apps for a year now, but it's my first time, that a part of app records users' voice (it's actually a 3-step process, first recording of "silence" to ...
Pristo's user avatar
  • 11
0 votes
1 answer
375 views

How to run codecept scenarios in order?

I am using the following command to run test scenario. npx codeceptjs run --steps --grep "A1|X2|A3" I am looking for a way to run these tests in the same order given. For some reason, this ...
Kavin404's user avatar
  • 959
2 votes
0 answers
159 views

Codeceptjs Error: "ERROR webdriver: Request failed with status 404 due to unknown command"

i got the error: 2022-07-31T14:09:08.666Z ERROR webdriver: Request failed with status 404 due to unknown command: The requested resource could not be found, or a request was received using an HTTP ...
Felipe Rossi's user avatar
0 votes
1 answer
147 views

CodeceptJS - canvas manipulation

I am writing an E2E test for our application. On one page there is a canvas that is showing a PDF file. The test case is show this page, scroll to the bottom of the PDF and check if the button under ...
Alorain's user avatar
0 votes
1 answer
49 views

How to configure Tesults report with CodeceptJS

I am trying to integrate Tesults dashboard with CodeceptJS + Playwright tests, but there seems not to be a way to pass playwright report configuration through codeceptJs' conf file. Documentation ...
Fernanda Oliveira's user avatar
1 vote
1 answer
260 views

How to get scenario name using CodeceptJs and Cucumber

I am using CodeceptJs with cucumber helper. For reporting options need to get Scenario name in Before section. Trying to use this documentation: https://codecept.io/bdd/#before So in Before(() =&...
Aleksandar Dermendzhi's user avatar
0 votes
1 answer
163 views

How to type text without selecting an element in CodeceptJS?

Normally I use I.fillField(elementSelector, text) to fill the text into the field with elementSelector xpath or sth. I have a case where there is only one element (Appium shows no nested elements), ...
s3c's user avatar
  • 1,481
2 votes
0 answers
801 views

ESLint plugin CodecptJS Cannot read properties of undefined (reading 'property')

I get the following error while running the eslint command PS C:\WORK\AutomationPlayground\codeceptjs-boilerplate-project> eslint "**/*.ts" --ignore-pattern node_modules/ Oops! Something ...
mismas's user avatar
  • 1,236
-2 votes
1 answer
30 views

How can I click a link of the first [td] based on staus of last [td] in the same [tr] using codeceptjs/javasrcipt

The expected: Select random one an assignment has status "Not start". Here is my table: <table id="table1"> <tbody> <tr class="odd1"> ...
Potter's user avatar
  • 1
1 vote
1 answer
233 views

Codeceptjs on Google Cloud Function goto of undefined

I'm trying to automate a web activity using CodeceptJS (with Puppeteer) running in a Google Cloud Function. My index.js is: const Container = require('codeceptjs').container; const Codecept = require('...
Evan Caldwell's user avatar
0 votes
1 answer
407 views

codeceptjs react testing - Clickable element was not found by text|CSS|XPath

I have a project made with react and rest api(php+mysql).I have to put it through a codeceptjs test.The app is working properly with countless of manual testing, and as far as I can see, the ...
elemeNt's user avatar
  • 41
1 vote
0 answers
176 views

Codeceptjs playright mocking network request

I.mockRoute('/api/**', route => { if (route.request().postData().includes('my-string')) route.fulfill({ body: 'mocked-data' }); else route.continue(); }); Command is not mocking with ...
Abhijith's user avatar
0 votes
1 answer
740 views

Codeceptjs: I got ERROR webdriver: Request failed with status 404 due to unknown command when trying to click to an mobile element

When I tried to click an element using Appium and Codeceptjs, I got the error below: ERROR webdriver: Request failed with status 404 due to unknown command: The requested resource could not be found, ...
minhnthcs 's user avatar
2 votes
1 answer
1k views

cannot read properties of undefined 'textContent'

I have a simple piece of code describe('My First Puppeeteer Test', () => { it('Should launch the browser', async function() { const browser = await puppeteer.launch({ headless: false}) ...
Ruslan Fazylyanov's user avatar
0 votes
2 answers
471 views

How to organize codeception tests in subfolders, and have one codecept.conf.js pointing to the whole folder schema

I'm having issues, creating subfolders in my './acceptance_tests.js/*_tests.js' pathname within my codecept config. I.e. My codecept.conf.js looks like this: exports.config = { tests: './...
ThatBraziliann's user avatar
0 votes
1 answer
965 views

"before each" hook: codeceptjs error message

im using codeceptjs using protractor helper, and i tried to wtite simple code and to run this command"npm run codeceptjs" and i faced this error "× "before each" hook: ...
lili99's user avatar
  • 1
0 votes
0 answers
643 views

How can I get full HTML mochawesome report using codeceptjs running test in parallel mode?

I am using codeceptjs library in order to develop and run automated tests. Currently I'm in process of run those tests in paralell using NodeJS` workers. CodeceptJS proposes this opportunity and ...
Snow's user avatar
  • 31
0 votes
2 answers
3k views

test something: selector needs to be typeof `string` or `function`

I want to write test on Visual Studio Code/Codeceptjs. My code is here in short : let amazonWebKeys=require('./amazonKeys/amazonwebkeys.json'); module.exports = function() { return actor({ ...
Ronin Roni's user avatar

1
2 3 4 5 6