{"action":"created","issue":{"url":"https://api.github.com/repos/angular/protractor/issues/2870","labels_url":"https://api.github.com/repos/angular/protractor/issues/2870/labels{/name}","comments_url":"https://api.github.com/repos/angular/protractor/issues/2870/comments","events_url":"https://api.github.com/repos/angular/protractor/issues/2870/events","html_url":"https://github.com/angular/protractor/issues/2870","id":128678583,"number":2870,"title":"Alt attribute in image tags in protractor","user":{"login":"patproc","id":16887027,"avatar_url":"https://avatars.githubusercontent.com/u/16887027?v=3","gravatar_id":"","url":"https://api.github.com/users/patproc","html_url":"https://github.com/patproc","followers_url":"https://api.github.com/users/patproc/followers","following_url":"https://api.github.com/users/patproc/following{/other_user}","gists_url":"https://api.github.com/users/patproc/gists{/gist_id}","starred_url":"https://api.github.com/users/patproc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patproc/subscriptions","organizations_url":"https://api.github.com/users/patproc/orgs","repos_url":"https://api.github.com/users/patproc/repos","events_url":"https://api.github.com/users/patproc/events{/privacy}","received_events_url":"https://api.github.com/users/patproc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-26T00:03:20Z","updated_at":"2016-01-26T04:15:34Z","closed_at":null,"body":"hi, i am new to protractor and need some help. i have a scenario where i need to assert if image have alt attribute. please see the following eg:\r\n\r\n(tag)img class=\"img-responsive\" itemprop=\"logo\" src=\"/1.5.19.0-SNAPSHOT/assets/ch-logo.png\" alt=\"CHI\">\r\n\r\nexpect(element(by.css(a.brand-logo img.img-responsive))).toBe(true);\r\n\r\n(tag)img src=\"/1.5.19.0-SNAPSHOT/assets/cp-logo-small.png\">\r\n\r\nexpect(element(by.css(img[src=\"/1.5.19.0-SNAPSHOT/assets/cp-logo-small.png\"]))).toBe(true);\r\n\r\nwhen i run the above two assertions they both are passing, but i want first to be pass and second to be fail as there is no alt attribute.\r\n\r\nmy aim is to get the all <img tags on webpage and assert that they must have alt attribute (no matter what text in it or empty)"},"comment":{"url":"https://api.github.com/repos/angular/protractor/issues/comments/174810924","html_url":"https://github.com/angular/protractor/issues/2870#issuecomment-174810924","issue_url":"https://api.github.com/repos/angular/protractor/issues/2870","id":174810924,"user":{"login":"NickTomlin","id":1290336,"avatar_url":"https://avatars.githubusercontent.com/u/1290336?v=3","gravatar_id":"","url":"https://api.github.com/users/NickTomlin","html_url":"https://github.com/NickTomlin","followers_url":"https://api.github.com/users/NickTomlin/followers","following_url":"https://api.github.com/users/NickTomlin/following{/other_user}","gists_url":"https://api.github.com/users/NickTomlin/gists{/gist_id}","starred_url":"https://api.github.com/users/NickTomlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickTomlin/subscriptions","organizations_url":"https://api.github.com/users/NickTomlin/orgs","repos_url":"https://api.github.com/users/NickTomlin/repos","events_url":"https://api.github.com/users/NickTomlin/events{/privacy}","received_events_url":"https://api.github.com/users/NickTomlin/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T04:15:34Z","updated_at":"2016-01-26T04:15:34Z","body":"Hi there!\r\n\r\nYour question is better suited for StackOverflow or Gitter. Please [ask a question there with the 'protractor' tag](http://stackoverflow.com/questions/ask?tags=protractor) or post in the [Gitter Channel](https://gitter.im/angular/protractor) to get help.\r\n\r\nFrom the the [getting help](https://github.com/angular/protractor#getting-help) section of the README:\r\n\r\n> Please ask usage and debugging questions on StackOverflow (use the \"protractor\" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)\r\n\r\nThanks!\r\n"}}