mardi 26 mai 2015

Unable to select element by model

I need to select an element by model name but it's not working, the details are given below:

The element is:

textarea rows="8" ng-model="panel.information_text['comment']" >

Our Code:

input_ele = element(by.model("panel.information_text[\'comment\']"));
console.log(input_ele.getText());

Output:

{ ptor_:
    { controlFlow: [Function],
    schedule: [Function],
    setFileDetector: [Function],
    getSession: [Function],
    getCapabilities: [Function],
    quit: [Function],
    actions: [Function],
    touchActions: [Function],
    executeScript: [Function],
    executeAsyncScript: [Function],
    call: [Function],
    wait: [Function],
    sleep: [Function],
    getWindowHandle: [Function],
    getAllWindowHandles: [Function],
    getPageSource: [Function],
    close: [Function],
    getCurrentUrl: [Function],
    getTitle: [Function],
    findElementInternal_: [Function],
    findDomElement_: [Function],
    findElementsInternal_: [Function],
    takeScreenshot: [Function],
    manage: [Function],
    switchTo: [Function],
    driver:
    }
}

Any help would be appreciated.

Aucun commentaire:

Enregistrer un commentaire