2017-06-05 58 views
0

無法訪問下面的元素無法訪問使用量角器

< input _ngcontent-c1="" name="field1" value="" type="text" > 

我聲明,並訪問要素如下,但無法訪問的元素「_ngcontent-C1」的元素。

Format1: this.loginTextBox = $("input[name='field1']"); 
        (or) 
Format2: loginTextBox : element(by.name('field1')), 

而在步驟定義我把它叫做是:

expect((login.loginTextBox).isPresent()).to.eventually.be.false; 

在執行上述條件得到了通過。任何人都可以幫助我在這....

回答

0

我假設**意味着評論線。 如果是這樣,一切看起來是正確的。您期望該元素不存在,並且由於已評論的輸入,斷言返回true。