Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Session interaction timing out for a particular site #55

@jcjmcclean

Description

@jcjmcclean

I'm experiencing an issue using Mink to control Firefox through Sahi where when I try to interact with the session in any way (e.g. running getPage()->getContent() or simply wait(2000)) I don't get the expected response and Mink eventually times out.

I've used the exact same code for various other websites and it works perfectly. This one single website seems to be stopping either Mink or Sahi from providing a response. I can't seem to find any reliable way of debugging the issue, all I can do is wait for the timeout to occur.

The code I'm using to retrieve the markup from a page is as follows:

// Configure driver
$this->driver = new \Behat\Mink\Driver\SahiDriver('firefox',
    new \Behat\SahiClient\Client(
        new \Behat\SahiClient\Connection(null, CRAWL_SERVER, 9999)
    )
);

// Init session:
$this->session = new \Behat\Mink\Session($this->driver);

// Start session:
$this->session->start();

// Open the url
$this->session->visit($config['url']);

// Get the markup from the page
$markup = $this->session->getPage()->getContent();

The page I'm trying to scrape is: https://www.o2.co.uk/shop/phones/

I also have a post up on on Stack Overflow here.

I'm using Mink 1.6 - installed using composer on 27/11/2014

tl;dr Why is Mink/Sahi timing out on this site?

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