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]
191 questions
0
votes
2 answers
How should multi-part Codecept.js scenarios be organized?
What is the preferred (or just a good) pattern for a multi-part Codecept.js scenario, such as this:
Select file to upload.
Clear selection.
Select file to upload after having cleared selection.
I can do this in a single scenario and use I.say to…
![](../../users/profiles/895323.webp)
Dane
- 1,191
- 7
- 16
0
votes
2 answers
What's the codeceptjs equivalent of expect?
I'm making an API call and want to verify that it succeeded. Something like this:
var response = await api.ensureSettings(data);
expect(response.code).toBe(200);
How can I check equivalence in codeceptjs?
![](../../users/profiles/1457295.webp)
NDavis
- 917
- 1
- 11
- 20
0
votes
2 answers
How can I call an xpath using i to increment the variable name in a for loop using Javascript?
Here are my simple globals which are called by EX: this.u5boys outside of a loop.
u5boys: {
xpath: "option[contains(text(), '5 Boys')]"
},
u6boys: {
xpath: "option[contains(text(), '6 Boys')]"
},
Here is a simple loop that will try to…
![](../../users/profiles/2344015.webp)
user2344015
- 23
- 2
- 7
0
votes
2 answers
Grab text from span and then compare it using CodeceptJS
I have this in source on one page:
666
And I have this in source on another page
777
I want to grab that 666 value, store it somewhere, and compare…
![](../../users/profiles/1540364.webp)
paveltk
- 3
- 4
0
votes
1 answer
nightmareJS timeout on vagrant
I have vagrant virtualmachine, I can access some endpoints from there (via curl). I installed node (v 8.4.0) and npm (v 5.3.0). I run it via sudo. I use nightmareJS and it can't connect to endpoint. I run the same tests case on other machine and it…
![](../../users/profiles/3455448.webp)
strz
- 1,155
- 15
- 32
0
votes
1 answer
CodeceptJs waiting for an element to disappear from DOM
I'm developing a testing suite and the only way I have found to be sure a page is ready, is when the selector 'div.spinner' disappear.
I was able to do catch this condition with CapserJs (with PhantomJs or…
![](../../users/profiles/3252742.webp)
sabau
- 141
- 1
- 10
0
votes
1 answer
Run setup once before acceptance tests
I have the following acceptance test suite written using CodeceptJS and it is working fine. I am using Before to log in before each of the steps. The problem is that the Before function is equivalent to Mocha's beforeEach, not Mocha's before, and…
![](../../users/profiles/200987.webp)
oligofren
- 15,352
- 12
- 75
- 134
0
votes
1 answer
How to open a new tab or window when using CodeceptJS
I am trying to create a test with CodeceptJS (using WebdriverIO helper) in which I first log in on site A and then open a new window(or tab) and log in on site B. By doing the second 'I.amOnPage() it just reuses the same browser window, but I want…
![](../../users/profiles/6261195.webp)
dwane_d
- 51
- 1
- 4
0
votes
2 answers
How to check url change after login
How can I check if URL change after login to know that the login was success....
'use strict';
let I;
module.exports = {
_init() {
I = actor();
},
fields: {
email: '[bo-email]',
password: '[bo-password]'
},
…
![](../../users/profiles/844039.webp)
Vitaly Menchikovsky
- 4,692
- 15
- 48
- 87
0
votes
2 answers
Parallelize execution of browsers by using CodeceptJS/WebdriverIO
I am using Codeceptjs for automation testing in javascript which internally uses WebDriverIO. I have achieved to run on Sauce, using the mentioned framework.
I have accomplished to run automation test cases in different browsers in sauce lab by…
![](../../users/profiles/3406893.webp)
pskushw
- 1
- 3
0
votes
1 answer
Handling assertions in a custom helper
I've started playing around with CodeceptJs and I've got it up working quite easily. I'm currently using it with NightmareJs and all seems fine.
The specific area I'm testing is a gallery that fetches data from an interface via JSONP creating a list…
![](../../users/profiles/999942.webp)
Mr Peach
- 1,324
- 1
- 13
- 19
0
votes
3 answers
codeceptjs - Error: Couldn't connect to selenium server / A session id is required for this command but wasn't found in the response payload
I used this quick start guide to install this test framework: https://github.com/codeception/codeceptjs/ .
After successful installation I edited my "mytest_test.js" with following additions:
Feature('CodeceptJS Demonstration');
Scenario('test some…
![](../../users/profiles/7131113.webp)
Meteor Newbie
- 556
- 1
- 6
- 22
0
votes
2 answers
Codeceptjs only works when installed globally
When I open the instructions to install CodeceptJS it offers the option to install the node_module both locally and globally. However only global install works. When I install codeceptjs locally in my express application then try to initialize the…
![](../../users/profiles/4328809.webp)
David Stewart
- 205
- 2
- 9
0
votes
1 answer
Handling popups while scraping with PhantomJS or other libraries
There are lots of libraries out there to scrape information from web pages. Some of them which I had a look…
![](../../users/profiles/234775.webp)
Ramazan Polat
- 4,788
- 1
- 35
- 60
0
votes
3 answers
codeceptJS - how to click specific element from list
With protractor it's possible by doing element.all(by.css("li")).get(0)
How to do it with codecept?
I tried with no success:
I.click('.item').get(1);
I.click('.item:nth-child(2)');
![](../../users/profiles/4520350.webp)
sebap
- 1,369
- 2
- 18
- 32