Protractor Interview Questions | Beginner | Experienced | Years

How to get text present between two span  ?

Since your span elements don’t have a text, you can basically “ignore” them. In other words, get the parent div element and get the text via getText()

element(by.id("123")).getText().then(function(textValue){
        console.log(textValue)
}

Leave a Reply

Your email address will not be published. Required fields are marked *