Dreamweaver
Dreamweaver

Reputation: 1346

Protractor: get the pseudo element : placeholder css

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

Answers (1)

Alpesh Prajapati
Alpesh Prajapati

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

Related Questions