{"action":"created","issue":{"url":"https://api.github.com/repos/cheezy/page-object/issues/273","labels_url":"https://api.github.com/repos/cheezy/page-object/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/cheezy/page-object/issues/273/comments","events_url":"https://api.github.com/repos/cheezy/page-object/issues/273/events","html_url":"https://github.com/cheezy/page-object/issues/273","id":66998223,"number":273,"title":"How does one get just the \"bare\" text of an element?","user":{"login":"abstiles","id":1497157,"avatar_url":"https://avatars.githubusercontent.com/u/1497157?v=3","gravatar_id":"","url":"https://api.github.com/users/abstiles","html_url":"https://github.com/abstiles","followers_url":"https://api.github.com/users/abstiles/followers","following_url":"https://api.github.com/users/abstiles/following{/other_user}","gists_url":"https://api.github.com/users/abstiles/gists{/gist_id}","starred_url":"https://api.github.com/users/abstiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abstiles/subscriptions","organizations_url":"https://api.github.com/users/abstiles/orgs","repos_url":"https://api.github.com/users/abstiles/repos","events_url":"https://api.github.com/users/abstiles/events{/privacy}","received_events_url":"https://api.github.com/users/abstiles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-07T21:48:32Z","updated_at":"2015-04-24T00:35:27Z","closed_at":null,"body":"I have a page I'm modeling with page objects which has some HTML like the following:\r\n\r\n```\r\n<a href=\"example.html\">\r\n    Some text\r\n    <span>Something else</span>\r\n</a>\r\n```\r\n\r\nIn my page object class, the method `link_element.text` gets me `\"Some text\\nSomething else\"`. Is there a way I can get just the `\"Some text\"` portion of the tag's contents?"},"comment":{"url":"https://api.github.com/repos/cheezy/page-object/issues/comments/95763008","html_url":"https://github.com/cheezy/page-object/issues/273#issuecomment-95763008","issue_url":"https://api.github.com/repos/cheezy/page-object/issues/273","id":95763008,"user":{"login":"daneandersen","id":4837260,"avatar_url":"https://avatars.githubusercontent.com/u/4837260?v=3","gravatar_id":"","url":"https://api.github.com/users/daneandersen","html_url":"https://github.com/daneandersen","followers_url":"https://api.github.com/users/daneandersen/followers","following_url":"https://api.github.com/users/daneandersen/following{/other_user}","gists_url":"https://api.github.com/users/daneandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/daneandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daneandersen/subscriptions","organizations_url":"https://api.github.com/users/daneandersen/orgs","repos_url":"https://api.github.com/users/daneandersen/repos","events_url":"https://api.github.com/users/daneandersen/events{/privacy}","received_events_url":"https://api.github.com/users/daneandersen/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T00:35:27Z","updated_at":"2015-04-24T00:35:27Z","body":"I don't believe there's a built in way in page-object, or even in the underlying webdrivers, but you can [use xpath](http://stackoverflow.com/questions/9192105/select-nodevalue-but-exclude-child-elements) to do it."}}