The invention relates to the technical field of webpage browsing, in particular to a method for automatically logging in a third-party system to obtain a page screenshot. The method comprises the following steps of S1, obtaining a webpage address which needs to be logged in and screenshot; S2, setting related parameters used for webpage login, and generating a corresponding parameter file by a PhantomJS tool; S3, initiating a screenshot request to the webpage address, and calling the parameter file by the PhantomJS tool to perform simulation login; and S4, after the simulation login is completed by the PhantomJS tool, obtaining the page screenshot. According to the invention, the PhantomJS tool is utilized to generate the corresponding parameter file with the login related parameters, the parameter file is called to carry out simulation login, and the screenshot is automatically obtained after the login succeeds, so that the situation that the page with a login interface is captured during screenshot is effectively avoided, manual login and manual screenshot are not needed, the screenshot efficiency is greatly improved, and the intelligent development of big data is facilitated.