Author Posts

April 21, 2016 at 12:34 am

Hi All,

I need one help here.........
i am trying to get the text from one of the page from one application by following path
login by entering username and password >> Tab1 >> Field1 >>text(from this page i need to copy the text by searching a string "string123")

i tried below code but it opening an application but it is login to that page

$url = "http://www.******.com"
$username="admin"
$password="*********"

$ie = New-Object -com internetexplorer.application;
$ie.visible = $true;
$ie.navigate($url);

while ($ie.Busy -eq $true)
{
Start-Sleep -Milliseconds 1000;
}
$ie.Document.getElementById("login").value = $username
$ie.Document.getElementByID("Passwd").value= $password

Import-Module WASP
$ie = Select-Window IEXPLORE | Set-WindowActive
$ie | Send-Keys "}Admin}"
Start-Sleep -Milliseconds 1000
$ie | Send-Keys "}ENTER]"

Thanks.

April 21, 2016 at 9:33 am

Can you please re-formulate your question? I don't understand what the problem is?

April 21, 2016 at 8:12 pm

My Question is.
I want to login in web application using powershell and perform some steps for example: i want to login to facebook i will perofrm the below steps
1: enter url: http://www.facebook.com
2. enter username and password
3. i will click on any tab like notification or request.

same i want to perform by using powershell. to perofrm same i have used the abaove mentioned code but that code only opeing the home page i am unable to login.