I want to get the text (SampleList23.csv
) that is present between 2 spans.
HTML:
<div class="ng-scope" ng-switch-when="false">
<div class="engage-tag ng-binding">
<span class="icon-doc-generic-b"/>
SampleList23.csv
<span class="icon-close close" ng-click="unsetImportFile()"/>
</div>
</div>
Code I have tried:
1. expect(element(by.xpath(".//*[@class='engage-tag ng binding']/*")).getAttribute("value")).toContain("SampleList23.csv");
2. expect(element(by.xpath("//*[@class='engage-tag ng-binding']/child::node()", 'SampleList23.csv);
3. expect(element(by.xpath("//*[@class='engage-tag ng-binding']/*", 'SampleList23.csv);
All above failed to get text.
text()
in the div . . .