{"action":"created","issue":{"url":"https://api.github.com/repos/gempesaw/Selenium-Remote-Driver/issues/179","labels_url":"https://api.github.com/repos/gempesaw/Selenium-Remote-Driver/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/gempesaw/Selenium-Remote-Driver/issues/179/comments","events_url":"https://api.github.com/repos/gempesaw/Selenium-Remote-Driver/issues/179/events","html_url":"https://github.com/gempesaw/Selenium-Remote-Driver/issues/179","id":55021019,"number":179,"title":"'find_element'-like functions in Test::Selenium::Remote::Driver should support a locator strategy as an argument","user":{"login":"peroumal1","id":1199066,"avatar_url":"https://avatars.githubusercontent.com/u/1199066?v=3","gravatar_id":"","url":"https://api.github.com/users/peroumal1","html_url":"https://github.com/peroumal1","followers_url":"https://api.github.com/users/peroumal1/followers","following_url":"https://api.github.com/users/peroumal1/following{/other_user}","gists_url":"https://api.github.com/users/peroumal1/gists{/gist_id}","starred_url":"https://api.github.com/users/peroumal1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peroumal1/subscriptions","organizations_url":"https://api.github.com/users/peroumal1/orgs","repos_url":"https://api.github.com/users/peroumal1/repos","events_url":"https://api.github.com/users/peroumal1/events{/privacy}","received_events_url":"https://api.github.com/users/peroumal1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"peroumal1","id":1199066,"avatar_url":"https://avatars.githubusercontent.com/u/1199066?v=3","gravatar_id":"","url":"https://api.github.com/users/peroumal1","html_url":"https://github.com/peroumal1","followers_url":"https://api.github.com/users/peroumal1/followers","following_url":"https://api.github.com/users/peroumal1/following{/other_user}","gists_url":"https://api.github.com/users/peroumal1/gists{/gist_id}","starred_url":"https://api.github.com/users/peroumal1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peroumal1/subscriptions","organizations_url":"https://api.github.com/users/peroumal1/orgs","repos_url":"https://api.github.com/users/peroumal1/repos","events_url":"https://api.github.com/users/peroumal1/events{/privacy}","received_events_url":"https://api.github.com/users/peroumal1/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-01-21T13:52:34Z","updated_at":"2015-01-22T12:50:40Z","closed_at":null,"body":"I raise this issue mainly because I found myself writing a lot lately : \r\n```perl \r\n$driver->default_finder('id');\r\n$driver->find_element_ok('some_id', 'my element was found'); \r\n$driver->default_finder('xpath'); \r\n$driver->find_element_ok('//some_xpath', 'my other element was found');\r\n```\r\nIf we could pass the locator strategy as an argument, it would allow one to write  : \r\n```perl \r\n$driver->find_element_ok('some_id','id','my element was found'); \r\n$driver->find_element_ok('//some_xpath','xpath', 'my other element was found'); \r\n```\r\nThere might be some issues doing this, but overall it would improve the readability of code written with T::S::R::D."},"comment":{"url":"https://api.github.com/repos/gempesaw/Selenium-Remote-Driver/issues/comments/71015641","html_url":"https://github.com/gempesaw/Selenium-Remote-Driver/issues/179#issuecomment-71015641","issue_url":"https://api.github.com/repos/gempesaw/Selenium-Remote-Driver/issues/179","id":71015641,"user":{"login":"peroumal1","id":1199066,"avatar_url":"https://avatars.githubusercontent.com/u/1199066?v=3","gravatar_id":"","url":"https://api.github.com/users/peroumal1","html_url":"https://github.com/peroumal1","followers_url":"https://api.github.com/users/peroumal1/followers","following_url":"https://api.github.com/users/peroumal1/following{/other_user}","gists_url":"https://api.github.com/users/peroumal1/gists{/gist_id}","starred_url":"https://api.github.com/users/peroumal1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peroumal1/subscriptions","organizations_url":"https://api.github.com/users/peroumal1/orgs","repos_url":"https://api.github.com/users/peroumal1/repos","events_url":"https://api.github.com/users/peroumal1/events{/privacy}","received_events_url":"https://api.github.com/users/peroumal1/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T12:50:40Z","updated_at":"2015-01-22T12:50:40Z","body":"OK I guess I am done, no need to update the mocks, the tests were put in t/Test-Selenium-Remote-Driver.t using the other mocking technique (adding a sub that returns an expected response). \r\n@gempesaw can you tell if this looks good to you ? "}}