-1

I'm using headless-chromium-php, but getHtml function seems to get the html source code. https://github.com/chrome-php/chrome#get-the-page-html

Instead, I want to get the DOM displayed in the chrome browser. so, How can i do it I want to get the html source after browser rendering.

nori
  • 45
  • 5

1 Answers1

2

As you surmise, you need to wait for the page to finish loading, including any javascript rendering; have a look at the example earlier on in that documentation https://github.com/chrome-php/chrome#evaluate-script-on-the-page to get the inner html.

dwi kristianto
  • 159
  • 2
  • 11