{"action":"created","issue":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/633","labels_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/633/comments","events_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/633/events","html_url":"https://github.com/nightwatchjs/nightwatch/issues/633","id":106178544,"number":633,"title":"How to .click on some css element containing text?","user":{"login":"drptbl","id":8177587,"avatar_url":"https://avatars.githubusercontent.com/u/8177587?v=3","gravatar_id":"","url":"https://api.github.com/users/drptbl","html_url":"https://github.com/drptbl","followers_url":"https://api.github.com/users/drptbl/followers","following_url":"https://api.github.com/users/drptbl/following{/other_user}","gists_url":"https://api.github.com/users/drptbl/gists{/gist_id}","starred_url":"https://api.github.com/users/drptbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drptbl/subscriptions","organizations_url":"https://api.github.com/users/drptbl/orgs","repos_url":"https://api.github.com/users/drptbl/repos","events_url":"https://api.github.com/users/drptbl/events{/privacy}","received_events_url":"https://api.github.com/users/drptbl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-12T18:58:41Z","updated_at":"2015-09-12T21:43:20Z","closed_at":null,"body":"Like in title, I'm struggling with this from 2 days already and I couldn't find a solution.\r\n\r\nHow to .click on some css element containing text?\r\n\r\nFor example - I'm having 5 .search-results css elements, each of them containing unique text.\r\n\r\nThis can be done with:\r\n`browser.jqueryClick('.search-result-name:contains(\"Something\")')`\r\nfrom custom nightwatch commands. But hey, they don't support Nightwatch.js Page Objects from what I know - atleast I couldn't make it working.\r\n\r\nAm I missing something?\r\n\r\nBest regards,\r\ndrptbl."},"comment":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/comments/139821642","html_url":"https://github.com/nightwatchjs/nightwatch/issues/633#issuecomment-139821642","issue_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/633","id":139821642,"user":{"login":"StephenDavidson","id":7658671,"avatar_url":"https://avatars.githubusercontent.com/u/7658671?v=3","gravatar_id":"","url":"https://api.github.com/users/StephenDavidson","html_url":"https://github.com/StephenDavidson","followers_url":"https://api.github.com/users/StephenDavidson/followers","following_url":"https://api.github.com/users/StephenDavidson/following{/other_user}","gists_url":"https://api.github.com/users/StephenDavidson/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenDavidson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenDavidson/subscriptions","organizations_url":"https://api.github.com/users/StephenDavidson/orgs","repos_url":"https://api.github.com/users/StephenDavidson/repos","events_url":"https://api.github.com/users/StephenDavidson/events{/privacy}","received_events_url":"https://api.github.com/users/StephenDavidson/received_events","type":"User","site_admin":false},"created_at":"2015-09-12T21:43:20Z","updated_at":"2015-09-12T21:43:20Z","body":"Yeah I had trouble using custom commands with page objects, so I just call it on the browser object instead. If I need the css from the page object I just embed it.\r\n\r\n```js\r\nbrowser.customCommand(pageObject.elements.elementName.selector, callback);\r\n```"}}