There is a goal using the Powershell script to parse a page that does not load immediately. How can you understand using Powershell when the page is fully loaded? I googled and found 2 options :
- Find an element that is already present on the final page, and use the start-sleep to parse the page until the element appears on the page;
- It does not fit, because when the service conducts those works, the element that is displayed after the full rendering of the page may never appear.
- Use the InternetExplorer Com object and use the
while($IE.busy) {Start-Sleep 1}wait again until the page is fully loaded.- I don’t really want to use it as now I’ll test the script on windows, but in the future I’m planning to transfer it to Linux. And though Powershell and .NET have been ported to Linux, I do not know how the InternetExplorer COM object will work there.