Script after logging into website

I had written script to login into gmail. Similarly, I had written the same for other internal website and after logging in, it have to click on some other button (like for suppose "spam" in gmail). Could you please help me out.

I had a trick like, in the same script we will wait for 15secs untill it login and after login the script continues again.

Thanks In Advance

January 10th, 2014 7:35am

I think you can use PowerShell + InternetExplorer to probably achieve what you are trying to do here.

Below is a link to get you started:

http://msdn.microsoft.com/en-us/magazine/cc337896.aspx
For Example you create a IE COM object and then navigate to Gmail then

C:\> $ie = New-Object -ComObject Internetexplorer.application
C:\> $ie.Visible = $true
C:\> $ie.Navigate("http://www.gmail.com")
C:\> $ie.LocationName # see the location name here
Gmail - Email from Google
C:\> # after logging in manually or through a Script
C:\> $ie.LocationName
Gmail

If you see the location name property changes after logging in...perhaps that can be helpful.

Regards

Free Windows Admin Tool Kit Click here and download it now
January 10th, 2014 10:16am

Hi Venkata Siva Krishna,

In addition, to click button in the website, this script below is helpful for you:

$ie = new-object -com internetexplorer.application
$ie.visible=$true
$ie.navigate('http://www.microsoft.com/en-sg/default.aspx')
while($ie.busy) {sleep 1}
$link = $ie.Document.getElementsByTagName('A') | where-object {$_.innerText -eq 'Outlook.com'}
$link.click()

You can change the url in $ie.navigate('') and the button in {$_.innerText -eq ''} to meet your need.

I hope this helps.

January 12th, 2014 9:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics