{"action":"created","issue":{"url":"https://api.github.com/repos/OpenBuildings/spiderling/issues/7","labels_url":"https://api.github.com/repos/OpenBuildings/spiderling/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/OpenBuildings/spiderling/issues/7/comments","events_url":"https://api.github.com/repos/OpenBuildings/spiderling/issues/7/events","html_url":"https://github.com/OpenBuildings/spiderling/issues/7","id":53342218,"number":7,"title":"Support for the title element with phantomjs driver","user":{"login":"halfer","id":480975,"avatar_url":"https://avatars.githubusercontent.com/u/480975?v=3","gravatar_id":"","url":"https://api.github.com/users/halfer","html_url":"https://github.com/halfer","followers_url":"https://api.github.com/users/halfer/followers","following_url":"https://api.github.com/users/halfer/following{/other_user}","gists_url":"https://api.github.com/users/halfer/gists{/gist_id}","starred_url":"https://api.github.com/users/halfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfer/subscriptions","organizations_url":"https://api.github.com/users/halfer/orgs","repos_url":"https://api.github.com/users/halfer/repos","events_url":"https://api.github.com/users/halfer/events{/privacy}","received_events_url":"https://api.github.com/users/halfer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-04T17:21:05Z","updated_at":"2015-04-21T15:28:46Z","closed_at":null,"body":"Here is a test I am running with phpunit-spiderling, nice and simple:\r\n\r\n\t/**\r\n\t * Check page title\r\n\t * \r\n\t * @todo Works with simple driver but not phantomjs, report bug\r\n\t * \r\n\t * @driver simple\r\n\t */\r\n\tpublic function testTitle()\r\n\t{\r\n\t\t$page = $this->visit(self::DOMAIN . '/browse');\r\n\t\t$this->assertEquals('Browse reports — Awooga', $page->find('title')->text());\r\n\t}\r\n\r\nIt works fine, but if I switch the driver to `phantomjs` it cannot find the element. I wonder, does the PhantomJS driver only look in the body of the HTML document?\r\n\r\nThis isn't urgent, as the `simple` driver is fine, and arguably is better where JavaScript does not need to be run. However, it would be good to know it works as it should in all drivers.\r\n\r\nHappy to supply an example script, if you have trouble re-creating this.\r\n"},"comment":{"url":"https://api.github.com/repos/OpenBuildings/spiderling/issues/comments/94839030","html_url":"https://github.com/OpenBuildings/spiderling/issues/7#issuecomment-94839030","issue_url":"https://api.github.com/repos/OpenBuildings/spiderling/issues/7","id":94839030,"user":{"login":"wakeless","id":224373,"avatar_url":"https://avatars.githubusercontent.com/u/224373?v=3","gravatar_id":"","url":"https://api.github.com/users/wakeless","html_url":"https://github.com/wakeless","followers_url":"https://api.github.com/users/wakeless/followers","following_url":"https://api.github.com/users/wakeless/following{/other_user}","gists_url":"https://api.github.com/users/wakeless/gists{/gist_id}","starred_url":"https://api.github.com/users/wakeless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wakeless/subscriptions","organizations_url":"https://api.github.com/users/wakeless/orgs","repos_url":"https://api.github.com/users/wakeless/repos","events_url":"https://api.github.com/users/wakeless/events{/privacy}","received_events_url":"https://api.github.com/users/wakeless/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T15:28:46Z","updated_at":"2015-04-21T15:28:46Z","body":"You seem to be able to do \r\n```php\r\n$page->find(\"title\", [\"visible\" => false])->text();\r\n```\r\n\r\nand it works."}}