Skip to content

Support for the title element with phantomjs driver #7

@halfer

Description

@halfer

Here is a test I am running with phpunit-spiderling, nice and simple:

/**
 * Check page title
 * 
 * @todo Works with simple driver but not phantomjs, report bug
 * 
 * @driver simple
 */
public function testTitle()
{
    $page = $this->visit(self::DOMAIN . '/browse');
    $this->assertEquals('Browse reports — Awooga', $page->find('title')->text());
}

It 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?

This 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.

Happy to supply an example script, if you have trouble re-creating this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions