dcsimg
Results 1 to 3 of 3

Thread: Error in webautomation using vb6 in windows 10

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2013
    Posts
    285

    Error in webautomation using vb6 in windows 10

    I am automating a website to fill login details. I have developed that app in vb6 and that was working greatly in windows xp, 7 and 8. Now it is giving error in Windows 10. In windows 10 when I run the exe directly, the login details are not filling.(I get "OnQuit fired" message). However, when I run the exe as Administrator it works properly. This is the vb6 code,
    Code:
    Private Sub Form_Load()
    
        Set Web = New SHDocVw.InternetExplorer
        Web.Visible = True
        Web.Navigate "https://mytestingsite/login.html ", 8
    End Sub
    Private Sub Web_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    On Error GoTo aaa
        'MsgBox "   URL: " & URL
        If URL = "https://mytestingsite/login.html" Then
        Web.Document.getElementById("Login_userName").Value = "abcd"
        Web.Document.getElementById("Login_userName").onchange
        Web.Document.getElementById("Login_password").Value = "123456789"
        Web.Document.getElementById("dateField").Value = "15/09/1954"
        End If
    Exit Sub
    aaa:
    MsgBox Err.Description & "   URL: " & URL
    End Sub
    Private Sub Web_OnQuit()
        MsgBox "OnQuit fired"
    End Sub
    My question is why run as administrator is required for simple web automation ? Is it not possible to run application in standard user in Windows 10 ? How to solve this problem ?

    Please don’t suggest me to rebuild application in .net ( It will take lot of time to convert my application to .net)
    Last edited by IT researcher; Jul 18th, 2016 at 12:24 AM.

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Error in webautomation using vb6 in windows 10

    I don't know what the error is because you didn't tell us but since when do you navigate to

    "http https://mytestingsite/login.html ", 8

    It should be one or the other, not both


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2013
    Posts
    285

    Re: Error in webautomation using vb6 in windows 10

    Quote Originally Posted by jmsrickland View Post
    I don't know what the error is because you didn't tell us
    When I run normally I used to get "OnQuit fired" message i.e the login details are not filled. If I run the same exe as administrator then login details are filled properly. This is the error.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width