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.

191 questions
7
votes
2 answers

How to Try Catch in CodeceptJS

I'm doing this in my page object: try{ I.selectOption(this.SELECT, this.OPTION); } catch(error){ I.say('Option missing, but thats sometimes expected ' + error); } But it still fails the test when the locator doesn't match an option element.…
Dingredient
  • 2,011
  • 17
  • 46
5
votes
2 answers

Q: CodeceptJS "unknown error": call function result missing 'value'

This is my Test Feature('Test'); Scenario('test something', (I) => { I.amOnPage(""); I.see("Welcome"); I.fillField('j_username', 'xxxxxx'); I.wait(3); }); This is my codeceptjs.JSON { "tests":…
3
votes
1 answer

Installation problems with CodeceptJS on Ubuntu

I was settings up a new system to use CodeceptJS and have hit an issue. I followed these notes, but just get an error when trying to run codeceptjs. The error…
AndyGaskell
  • 522
  • 6
  • 19
3
votes
2 answers

I.click()-selector in CodeceptJS - how to find first button with specific innerHTML

I have various buttons and several buttons with the same name "Start". I need to click on the first found button with this name (innerHTML). With jQuery this works with : $('button:contains(Start):first').click() How does it work with…
Meteor Newbie
  • 556
  • 1
  • 6
  • 22
2
votes
0 answers

Codeceptjs Error - Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible

CodeceptJS v3.0.5 Using test root "/Users/bhupendrarautela/extram" login -- ✖ "before all" hook: codeceptjs.beforeSuite for "test something" in 17ms Error: Can't connect to WebDriver. Error: Failed to create session. Unable to connect to…
HillHacker
  • 2,902
  • 6
  • 15
  • 23
2
votes
1 answer

Manage error in custom step for autologin in CodeceptJS

I'm using autoLogin plugin in CodeceptJS project with Puppeteer as testing lib. This is my first project with CodeceptJS, the autoLogin workflow is working fine, but I'm not using the application pages (UI) to login or check the current token, I'm…
Roberto
  • 7,296
  • 2
  • 39
  • 46
2
votes
1 answer

How return value from the function-CodeceptJS

I need to get a value from excel file when status column value is “Y” and I wanted to return the value from Name Column to the calling function and excel sheet contains the data is as follows Name Number status YYYY 1234 N XXXXX 3456 Y Function I…
Sudhakar
  • 21
  • 2
2
votes
1 answer

Not able to run my CodeceptJS testcases in headless chrome

I have CodeceptJS framework setup for my application & tests are runnning smooth. But now I want them to run headless chrome. Tried few things mentioned on official site ,but its not working for me. I try to run my tests with npx codeceptjs run…
2
votes
1 answer

How do I access WebdriverIO element methods in CodeceptJS helper?

I am using CodeceptJS along with WebDriverIO for writing E2E tests in my Angular App. My Angular app has some web components with shadow DOM. What I want is to get a reference to elements inside shadow roots and perform certain actions like click,…
2
votes
2 answers

How can we use Typescript with CodeceptJS for testing framework?

I have to create a testing framework using CodeceptJS. I am trying to use typescript instead of javascript to write my page objects and tests. Can someone help with what configuration is required in conf.js or steps.ts file I have added below in…
Mithun
  • 23
  • 1
  • 7
2
votes
1 answer

Codeceptjs/Puppeteer test fails ONLY on Jenkins: "Node is either not visible or not an HTMLElement"

I have a Codeceptjs/Puppeteer test that runs locally on containers orchestrated by Kubernetes and using data coming from AWS. Example code ... I.waitForVisible('#§Brand§amazon + div', 30); I.scrollTo('#§Brand§amazon + div', 30); // Jenkins stops…
gigiz
  • 56
  • 4
2
votes
2 answers

Allure report does not display categories [codeceptjs]

I am trying to categorize by the failed test result in various categories using the categories.json file. I am using following JSON file: [ { "name": "Ignored tests", "matchedStatuses": ["skipped"] }, { "name":…
2
votes
1 answer

Unresolved functions or methods using CodeceptJS in PhpStorm

I've just followed the CodeceptJS Quickstart and opened first_test.js in the PhpStorm IDE (equivalent to WebStorm, IntelliJ, etc.). For all the built-in functions, I'm getting "Unresolved function or method …": I also don't get any autocompletion…
2
votes
1 answer

How to override functions in CodeceptJS

I want to do something every time I click an element. So when I call click I.click(locator); Instead of calling webdriver click function, I want it to call my override which I've added to steps_file.js click(locator){ // do something first …
Dingredient
  • 2,011
  • 17
  • 46
2
votes
2 answers

How to add images to mochawesome report using Codeceptjs?

I'm doing E2E Tests on my own and I found really useful node libraries such as CodeceptJS, WebdriverIO and mocha (mochawesome). Mochawesome permit to add images in the report but in the way that is explained in its docs with addContext…
Mitro
  • 1,179
  • 6
  • 25
  • 58
1
2 3
12 13