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?
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 simplywait(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:
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?