Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling IE, passing text into a textbox
Message
De
14/01/2002 07:44:22
 
 
À
14/01/2002 03:10:38
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00604180
Message ID:
00604220
Vues:
22
>Hi
>
>I have a page which has a text box on it and a button.
>
>I want to be able to place some sext into the Box, and click on the submit button.
>
>I know how to create an instance of IE, but do not know the objects to manipulate to enable me to place the text and click on the button via automation
>
>Does anyone have an example of how to do this
>
>Hope you can help
>
>Regards
>
>
>Steven

One method would be to use the GetElementByID method of the Document property from the browser.

Assuming you have named the textbox "text1" & the button as "button1" on the HTML page, something like the following should work :
CurDoc = thisform.browser1.Document
TxtBox = CurDoc.GetElementByID( "text1" )
TxtBox.InnerText = "Some New Text"
Button = CurDoc.GetElementByID( "button1" )
Button.Click()
Len Speed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform