CLEAR(IEApp); CLEAR(HTMLDoc); CREATE(IEApp); IEApp.Navigate('http://www.testpage.com'); WHILE IEApp.Busy DO; //wait for the page to load HTMLDoc := IEApp.Document; WHILE IEApp.Busy DO; //wait for the page to load HTMLInputElement := HTMLDoc.getElementById('type_of_drink'); HTMLInputElement.value := 'juice'; //I get error here!!! HTMLInputElement.click; IEApp.Visible := TRUE;Unfortunatelly I don't know how to select an item from the combo box on the page. On the page there is combo named type_of_drink, where you can select: water, juice or wine. I gues the only problem is how to fill or select the correct option form combo box. The vairables I used are:
Name DataType Subtype Length IEApp Automation 'Microsoft Internet Controls'.InternetExplorer HTMLDoc Automation 'Microsoft HTML Object Library'.HTMLDocument HTMLInputElement Automation 'Microsoft HTML Object Library'.HTMLInputElementAny suggestion, higly appreciated.
Comments
So instead of setting the value to juice you would set it to 1. You can probably look at the HTML code and see if something like this is in there.
My Blog - nav.education
I believe in basic HTML you're loooking for a Select and Option tags. In the Option tags you should see a string value that exists behind the actual value displayed to the user.
Also one other thing to check is that the case matches exactly. I think the HTML Automation controls are case sensitive.
Just a few more suggestions
Epimatic Corp.
http://www.epimatic.com