简体   繁体   中英

asp.net for automated website login testing

I am trying to login automatically from my site to remote website and this is her link RoundCube I stocked in this case about 2 weeks without any result. note that I use asp.net vb.

 Dim remoteUrl As String = "https://mail.ovh.net/roundcube/"
    Dim firstName As String = "MyName"
    Dim password As String = "MyPass"
    Dim encoding As ASCIIEncoding = New ASCIIEncoding
    Dim data As String = String.Format("FirstName={0}&MyPass={1}", MyName, MyPass)
    Dim bytes() As Byte = encoding.GetBytes(data)
    Dim httpRequest As HttpWebRequest = CType(WebRequest.Create(remoteUrl), HttpWebRequest)
    httpRequest.Method = "POST"
    httpRequest.ContentType = "application/x-www-form-urlencoded"
    httpRequest.ContentLength = bytes.Length()
    Dim stream As Stream = httpRequest.GetRequestStream
    stream.Write(bytes, 0, bytes.Length)
    stream.Close()

2) this is the remote site link https://mail.ovh.net/roundcube/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM