I just spent a lot of time learning the Webdriver.io API in order to test a form containing a table with cells with different types of fields (checkbox, button, dropdown, etc.) . The last task was to submit the form . . . and WHAM ! Zero success!
The failure is completely silent. It is as though the click(), or the submit() or the submitForm() command was never issued.
@deb Ok! Yup! That was exactly the solution in my case. Iβd be curious to know the solution if one has no access to the source code of the SUT, but not enough to pursue it right now?
I really appreciate your help with that. I was looking at other possible causes entirely.
TypeError: Cannot read property 'browser' of undefined
at World.<anonymous> (/home/yourself/projects/golden_meteoris/tests/cucumber/features/lib/hooks.js:24:12)
My hooks.js file looks like this :
(function () {
'use strict';
module.exports = function () {
var helper = this;
this.Before(function () {
var world = helper.world;
var next = arguments[arguments.length - 1];
world.browser.
init().
setViewportSize({
width: 1280,
height: 1024
}).
call(next);
});
this.After(function () {
var world = helper.world;
var next = arguments[arguments.length - 1];
world.browser.
end().
call(next);
});
};
})();
Feature: Create a new master collection
As a developer I need to be able to create the CRUDSS operations for a master collection
I want to specify its name and the fields specifications of the collection
So that I have a fully manageable new collection, ready to associate with a slave collection
Scenario:
Given I am on the CRUDSS generator page
When I name my new collection "jobs"
And I add the table :
| Name | Type | Required | Label | isOf | FK |
| title | String | required | Title | null | null |
| posted | Date | required | Date | null | null |
And I generate the new collection
Then I can open the "jobs" manager's index page
But, I see that all the stuff about βhooksβ and βworldβ is now obsolete, correct?
By the way . . . I am playing with Meteoris and its CRUD generator. I have added a tests directory and have got the first part of the user guide automated with Cucumber.
Iβll post a pull request when I have adapted my work to date to your new version.