Is it possible to get next sibling using cssContainingText in Protractor
What if you would get it in one go using by.xpath()
:
element(by.xpath('//div[@class="text-label" and . = "SomeText"]/following-sibling::div'))
Or, you can combine it with cssContainingText()
:
element(by.cssContainingText('div.text-label','SomeText')).element(by.xpath('following-sibling::div'))