menu

Questions & Answers

Is there way to use php like console in deleveloper mode in the browser?

I need to click button which has some action in JS listener, normally I would do

document.getElementsByClassName('bttn')[0].click();

in developer mode console, but this must be automated in PHP. After clicking button, page content changes, and i need to download this new source code. Page isn't mine.

Comments:
2023-01-17 18:34:56
You are really going to have to give us a much better description of this situation. We are not looking over your shoulder! The longer you spend making sure the question is complete and useful the quicker and more likely you are to get an answer
2023-01-17 18:34:56
If I understand you correctly, you want to use PHP to make a request to a site you're not hosting, have that PHP emulate clicking a button, then wait for the page to refresh and scrape the contents of the new page. You might make use of a browser testing automation framework like Selenium or Dusk or Panther.
Answers(0) :