dimanche 22 avril 2018

How to setValue() into textarea using nightwatch

sendShareInvite: function(name) {
    var selector = selectors.list.shareButton;
    var field = selectors.list.shareEmailField;
    var confirm = selectors.list.sendShareInvite;
    this.api
        .useCss()
        .waitForElementVisible(selector, this.api.globals.waitOperationTimeout())
        .click(selector)
        .pause(3000)
        .clearValue(field) // error
        .setValue(field, name) //error
        .waitForElementVisible(confirm, this.api.globals.waitOperationTimeout())
        .click(confirm);
    this.api.pause(1000);
    return this;
},

field = 'textarea.apps-share-chips-input'

I get unable to locate element, but in chrome console works fine. What am i doing wrong? Also tried instead of 'field' use selector, but it didn't work. Area that i want to find it's email field to share google docs

Aucun commentaire:

Enregistrer un commentaire