You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
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();
What I need to know is actual API call that is made to Sahi that causes that error. Then we can Google that and see if anybody else had similar problem.
@aik099 I'm pretty new to Sahi and Mink and I'm not sure how to debug Sahi communications/requests made to SahiClient. Could you point me in the right direction?
Have you considered changing driver in in Mink from Sahi to say Selenium2? If you've not using Sahi-specific functionality, then this should be pretty easy.
I guess that you need to start with is creating a standalone reproducible test case in driver's test suite:
You should see your test fails due timeout or exception about that timeout. Then you can place breakpoint in getContent method call and debug the test safely.
You should have sahi running somewhere for all that to work.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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?
The text was updated successfully, but these errors were encountered: