Reputation: 1346
Does anyone have an idea how to get the css for placeholder in input tag in protractor test cases?
Please help.
Upvotes: 1
Views: 976
Reputation: 1653
You can check below example.
Protactor:
element(by.model('yourName')).getAttribute("placeholder").getCssValue("color")
.then(function(value){
console.log("color value :: ", value)
});
HTML:
<input id="input-search" ng-model="yourName" type="text" placeholder="Filter data" >
Upvotes: 3