Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot load more than two IE instances
Message
De
25/04/2015 14:11:41
 
 
À
04/12/2014 20:28:21
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611875
Message ID:
01619129
Vues:
35
In regards to this, I have simplified it like this:
<!DOCTYPE html>

<html>
<body> 

<form method="post" id="Form1">
<input type="text" id="Username">
<input type="text" id="Password">
</form>

</body> 
</html> 
Then, from the code:
        Dim loInternetExplorer As SHDocVw.InternetExplorer = Nothing

        loInternetExplorer = New SHDocVw.InternetExplorer
        loInternetExplorer.Visible = True
        loInternetExplorer.Navigate("TheUrl")
        apiShowWindow(loInternetExplorer.HWND, SW_MAXIMIZE)
        Do While (loInternetExplorer.Busy)
            System.Threading.Thread.Sleep(100)
        Loop
        loInternetExplorer.Document.getElementById("Username").Value = "Something"
        loInternetExplorer.Document.getElementById("Password").Value = "Something"
        loInternetExplorer.Document.getElementById("Form1").submit()

        loInternetExplorer = New SHDocVw.InternetExplorer
        loInternetExplorer.Visible = True
        loInternetExplorer.Navigate("TheUrl")
        apiShowWindow(loInternetExplorer.HWND, SW_MAXIMIZE)
        Do While (loInternetExplorer.Busy)
            System.Threading.Thread.Sleep(100)
        Loop
        loInternetExplorer.Document.getElementById("Username").Value = "Something"
        loInternetExplorer.Document.getElementById("Password").Value = "Something"
        loInternetExplorer.Document.getElementById("Form1").submit()
As soon as the second automation is processed, immediately on the first loInternetExplorer.Document.getElementById("Username").Value = "Something" line, this crashes.

There has to be something obvious I am missing.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform