{"action":"opened","issue":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/1282","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/1282/labels{/name}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/1282/comments","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/1282/events","html_url":"https://github.com/SeleniumHQ/selenium/issues/1282","id":117822758,"number":1282,"title":"java: User-friendly description for By* classes (in error case)","user":{"login":"dimand58","id":5477035,"avatar_url":"https://avatars.githubusercontent.com/u/5477035?v=3","gravatar_id":"","url":"https://api.github.com/users/dimand58","html_url":"https://github.com/dimand58","followers_url":"https://api.github.com/users/dimand58/followers","following_url":"https://api.github.com/users/dimand58/following{/other_user}","gists_url":"https://api.github.com/users/dimand58/gists{/gist_id}","starred_url":"https://api.github.com/users/dimand58/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimand58/subscriptions","organizations_url":"https://api.github.com/users/dimand58/orgs","repos_url":"https://api.github.com/users/dimand58/repos","events_url":"https://api.github.com/users/dimand58/events{/privacy}","received_events_url":"https://api.github.com/users/dimand58/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-19T14:16:42Z","updated_at":"2015-11-19T14:16:42Z","closed_at":null,"body":"**Description**\r\n1) It would be great to have opportunity for adding of user-friendly description for By locators:\r\n// Some page object class\r\n// Section with web-elements locators (as example)\r\nprivate By someLocator = By.id(\"id123\").description(\"Element Foo on page Bar\");\r\n// or\r\nprivate By someLocator2 = By.id(\"id123\", \"Element Foo on page Bar\");\r\n\r\n2) For FindBy annotation need to add new attribute \"description\"\r\n\r\n3) Need to change toString() method in ById and others By* classes (add \"description\" output)\r\n\r\n**Benefits**\r\nMore readable errors (element not found and etc). *Both* locator and *user-friendly description* (for problem element) will be present in test report (in stack-trace if error occured)\r\n\r\n*Drawbacks*\r\n-"}}