Need Get Text From Web Application

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Vishal Joshi Vishal Joshi 7 months, 2 weeks ago.

  • Author
    Posts
  • #38097
    Profile photo of Vishal Joshi
    Vishal Joshi
    Participant

    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.

  • #38119
    Profile photo of Richard Diphoorn
    Richard Diphoorn
    Participant

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

  • #38138
    Profile photo of Vishal Joshi
    Vishal Joshi
    Participant

    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.

You must be logged in to reply to this topic.