Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE Automation help if possible..

Status
Not open for further replies.

EzLogic

Programmer
Aug 21, 2001
1,230
US
VFP 9 SP2
IE 9

I have a website that i am automating a task for a client.
In IE, on the website, there is a text box where user enters a serial number, and when they tab out of it (lostfocus/onblur), the site checks the serial number and responds back with a message.

i am trying to invoke the steps:

i got so far
Code:
                PUBLIC oWeb 
		IF TYPE("oWeb") <> "O"
			oWeb = CREATEOBJECT("InternetExplorer.Application")
			oWeb.Visible = .t. 
		ENDIF 
                oWeb.Navigate(lcURL)
                Waitforie(oWeb)
                oWeb.document.GetElementByID("FieldOnTheSite").value = lcSerial

it fills in the form field.

now, i'm trying to submit the form, or invoke on blur.

so, i tried:
aa = oWeb.document.GetElementByID("FieldOntheSite")
aa.FireEvent("OnBlur")

tried oWeb.document.forms[0].submit

etc..

any idea?


Ali Koumaiha
TeknoSoft Inc.
Michigan
 
Hi Ali,
in similar situations helps me sometimes command element.click() like:

Code:
oWeb.document.getElementById("loginForm").getElementsByTagName("input")[7].click()

where control on a web page must be a type SUBMIT ("input")[7].type="submit" and 7 was an index in one particular case.
Even if this doesn't work for you, I can assure you, that you are going a right way. One only need to find a right reference to Submit element.
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top