Closed consigliere23 closed 4 months ago
It's a real browser, it will follow any redirect by default. You can wait a couple of seconds manually in your php code, but you can't listen for the execution of a specific js in the browser.
The headless option enables or disables the browser UI. Some sites may try to detect this to prevent bots.
Yes thanks, that's what I thought. How to set manually in code to wait? Just sleep or there is some method for it? As I need to wait ajax requests on page to finish in order to get html when these js are executed. One more question, is there any option to get get page status code?
You can wait with using sleep
or use the method Page::waitUntilContainsElement
if the script you are waiting happens to create a new element on the page.
To get the page status code, see #41
@enricodias thanks
How to follow redirects? Can we say when page is loaded fully-u to wait couple of seconds (until some JS is executed)?
I have one more question, what's the difference between headless true and false? If I set it to false, it should work same as with headless = true? I am having issue with one site, when headless is false it works, and if true it does not work?