如果按鈕中的跨度文本是「Vigente」,則需要使用expect和Jasmine進行檢查。我該怎麼做?使用量角器獲得跨度中的文本
<button _ngcontent-hke-28="" class="btn btn-success disabled" tabindex="-1">
<span _ngcontent-hke-28="" class="glyphicon glyphicon-check">
</span> Vigente</button>
我可以使用XPath這樣的:
/HTML /體/應用/ AUTH-容器/佈局/ DIV /主要內容/ DIV /諾瑪 - cadastro/DIV /表格/ DIV [8]/DIV /按鍵/文本(Vigente)
如果我有文字 「Vigênciainvalida」 的按鈕。 我想用 'expect(element(by.partialButtonText(「Vigênciainvalida」))。isPresent()).BeBe(true);' 但它不起作用 – paulotarcio
@paulotarcio好嗎,你確定領先空間需要嗎?謝謝。 – alecxe
我嘗試沒有領先的空間和leaging空間,都沒有工作 – paulotarcio