Nightwatchjs getvalue of several input

334
August 01, 2017, at 10:02 PM

Is there any way using nightwatchjs to get the value of several inputs?

I need to test the value of several inputs at the same time.

Thanks in advance.

Answer 1

You can use getText or getValue method, example:

this.demoTest = function (browser) {
  browser.getText("#main ul li a.first", function(result) {
    this.assert.equal(typeof result, "object");
    this.assert.equal(result.status, 0);
    this.assert.equal(result.value, "nightwatchjs.org");
  });
};
this.demoTest = function (browser) {
  browser.getValue("form.login input[type=text]", function(result) {
    this.assert.equal(typeof result, "object");
    this.assert.equal(result.status, 0);
    this.assert.equal(result.value, "enter username");
  });
};

There api documents:getText API reference

READ ALSO
ExtrudeGeometry texture difference with BoxGeometry

ExtrudeGeometry texture difference with BoxGeometry

I have two objects, THREEBoxGeometry and extruded THREE

429
Mouseenter Event Failing to Trigger

Mouseenter Event Failing to Trigger

I have a set of 3 menu items that i'm trying to add a mouseenter event toI can't seem to get it to work at all

280