View Single Post
Old 08-23-2008   #6 (permalink)
James Whitlow


 
 

Re: Using sendkeys in a web form

"LuisE" <legonzales@xxxxxx> wrote in message
news:433ED65F-7746-4235-867A-BE58AF0C2338@xxxxxx
Quote:

> Thanks James, it works fine.
>
> In your code, what should I change if I need to use different fields of
> the
> form?
You will need to look at the source code of the page to determine that.
In the example you posted, I right clicked, selected 'View Source' and
searched for 'Booking Date:' & then 'Date:' under that. I searched up for
'action' to find the post URL. I then looked at the names of the input
fields. The date field is named 'Date' & the Report radio buttons are named
'report'. Just take the Post URL, add a question mark and then the field
names followed by an equal sign and the value you wish to pass. Separate the
fields with ampersands. In this case, I added '?Date=082208&report=D' to the
end of the Post URL.

I am not sure of a way to get the field names other than digging through
the HTML source code. There are probably others in the group that can offer
you a better way to do this. Firefox 2.x used to provide the fields names in
'View Page Info', but Firefox 3.x does not.

If you have trouble with the above, just advise the field names you are
looking for and either myself of someone else from the group can probably
help you determine them.


My System SpecsSystem Spec