Created
September 7, 2017 17:10
-
-
Save PrateekKumarSingh/2be6594ab3b4e9b0e11277614f2d56c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$InternetExplorer = New-Object -ComObject InternetExplorer.Application -property @{ | |
Navigate = 'http://www.twitter.com/following' | |
Visible = $true | |
} | |
# Wait unitl IE is busy | |
While($InternetExplorer.busy){ Write-Verbose "Internet Explorer is Busy, waiting for few seconds";Start-Sleep -Seconds 5 } | |
$start = Get-Date;$VerticalScroll = 0 | |
Write-Host "Scrolling the WebPage to auto-populate all profiles for next 60 Secs" -ForegroundColor Yellow | |
# 60 Secs to Infinitely scroll webpage, So that all items are populated that only come when you scroll down | |
While((Get-Date) -lt $($start + [timespan]::new(0,0,60))) { | |
$InternetExplorer.Document.parentWindow.scrollTo(0,$VerticalScroll) | |
$VerticalScroll = $VerticalScroll + 100 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment