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.

251 questions
1
vote
1 answer

grabAttributeFrom() method not returning the attribute value

I am trying to get the attribute value of an element by using I.grabAttributeFrom() method but I always get undefined instead of the attribute value. My code is Scenario('Smoketest', async (I) => { const columnIndex = await…
1
vote
1 answer

CodeceptJS closing browser window after finish

I´m new to CodeceptJS with Puppeteer. I want to let my window browser open after the finish. Feature('Login'); Scenario('test', (I) => { I.amOnPage('https://google.es') });
1
vote
2 answers

CodeceptJS / Puppeteer doesn't recognize 'if' statement

not really familiar with js/node.js. using codeceptjs/puppeteer for some automated tests. right now trying to edit a description in a test. but sometimes a description isn't there - therefor the 'edit description' button is not there - and there is…
amnmustafa15
  • 121
  • 1
  • 14
1
vote
1 answer

Run custom JavaScript in Chromium with CodeceptJS?

I need to mock the time for my CodeceptJS tests. My React component uses the new Date() function: const Component = () => { console.log(new Date()) return

Im a component

} I need the component to think it's 2018. For my Jest unit…
Evanss
  • 23,390
  • 94
  • 282
  • 505
1
vote
1 answer

I'm trying to use some native puppeteer with codeceptjs to find all aspects of an element using its ID

I'm using codeceptjs with puppeteer. Now the problem I'm having I'm either not aware it can be done within puppeteer, or I'm not sure how to do this with the native puppeteer. I'm wanting to target an element and get all the information for that…
Daniel
  • 45
  • 6
1
vote
2 answers

Need an auto-complete plugin for codeceptjs

I am very new to Codeceptjs. I'm using Visual Studio Code to write some sample tests. It will really help me if I could have something like an auto-complete for the methods so when I typed for instance I.see it shows me the options that I have, for…
farm command
  • 653
  • 3
  • 7
  • 18
1
vote
2 answers

How to link feature files with step definition in CodeceptJS?

I'm trying to implement the BDD framework in CodeceptJS using PHPStorm as my IDE. But for some reason it is not recognising the step definitions and in the feature file it shows the error Undefined step reference I followed the steps given in the…
Cathy 007
  • 41
  • 8
1
vote
0 answers

CodeceptJS: Semantical check for assigned tags

we are currently trying to implement codeceptjs e2e test suites for our application. We are using some tags at the tests to identify tests which should only run under specific circumstances (for instance only on some country channels with specific…
RoK
  • 1,862
  • 3
  • 14
  • 17
1
vote
1 answer

correct way to fire out a fail result in page reponse event listener in codeceptJS

I wrote a helper methods to add a network response listener over Puppeteer page instance. the code looks like this let Helper = codecept_helper; class CheckHelper extends Helper { async listenRequest(listener) { const helper =…
Kent Wood
  • 1,392
  • 2
  • 14
  • 30
1
vote
2 answers

Possibility to use devtools on chrome browser using CodeceptJS

I have to write tests for web application and also I have to use them on mobile chrome browser.It is any possibility to use chrome devtools and mobile device emulator during test? Thanks for help
vott
  • 53
  • 8
1
vote
3 answers

Using Custom Functions with "I" in Page Object and Custom Helper in CodeceptJS

Hi CodeceptJS Community, Is there a way to use custom defined functions (under steps_file.js) as I. customFunction() in page object files. Is there a way to use native codeceptjs functions (like I.click()) in my custom helper files I couldn't…
tewoos
  • 45
  • 2
  • 10
1
vote
2 answers

Codeceptjs Headless tests with https do not work

When i run tests with https headless, the error below shows up bash Error: move target out of bounds: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. Running without --headless option, it works but…
Matheus Souza
  • 55
  • 1
  • 6
1
vote
3 answers

How to skip or ignore programmatically a suite in CodeceptJS

As the test suite grows I need to be able to run something in BeforeSuite() which will connect to external suite and skip the suite if an external resource is unavailable. Feature('External Server'); BeforeSuite((I) => { // Check if server is…
WooDzu
  • 4,771
  • 6
  • 31
  • 61
1
vote
2 answers

Continue after failed test with codeceptjs

I'm using codeceptjs with puppeteer to test if endpoints of a single page app are up and have the correct content on them. I need to use something like codeceptjs w/ puppeteer since each of the endpoints have to render, because much of the content…
user10194756
  • 63
  • 1
  • 1
  • 8
1
vote
2 answers

How can i wait for some text without stopping the execution of the test?

I am doing some end-to-end test with CodeceptJS and WebdriverIO helper and I would like to wait an error message in my Vue.js SPA. I want to know if there is a way to wait for a text asynchronously during the runtime of the test. I don't want to…
SciallaMan
  • 21
  • 5