1 Replies - 359 Views - Last Post: 16 May 2014 - 06:40 AM Rate Topic: -----

#1 PinGu.  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-June 11

Auto fill in web form using VB Script or VB.NET

Posted 10 May 2014 - 03:34 AM

Good Day,

I am developing a simple program that will automatically fill a website form at one execute of .vbs

My First attempt is to: <a href="http://www.tekibears.com/">http://www.tekibears.com/</a>[<a href="http://www.tekibears.com/" target="_blank" title="New Window">^</a>]

Sample #1
The code below really works

On Error Resume Next
Const PAGE_LOADED = 4
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("http://www.tekibears.com/contact-us")
objIE.Visible = True

WScript.Sleep(1000) 

objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-0").Value = "sampletext@yahoo.com"
objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-1").Value = "sampletext@yahoo.com"
objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-2").Value = "sampletext@yahoo.com"
objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-3").Value = "sampletext@yahoo.com"
objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-4").Value = "sampletext@yahoo.com"
objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-5").Value = "sampletext@yahoo.com"
objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-6").Value = "sampletext@yahoo.com"
objIE.document.all.Item("w-form-521e10620cf2287d915d4cfd-7").Value = "sampletext@yahoo.com"

objIE.document.all.Item("contact_form-20684482-DC5A-476A-A102-DE809178C376-submit").submit




Sample #2
My second attempt has a little problem with combo boxes i think, Using IE with default username "toresdodo" and password "ea67f4" already signed in to the account i executed this script

On Error Resume Next
Const PAGE_LOADED = 4
Set objIE = CreateObject("InternetExplorer.Application")
Call objIE.Navigate("http://66.96.90.84/newitem.php")
objIE.Visible = True
Do Until objIE.ReadyState = PAGE_LOADED : Call WScript.Sleep(100) : Loop

objIE.document.all.Item("sec").selectedvalue = "Want To Buy"
objIE.document.all.Item("name").Value = "2pcs bullet Camera Package"
objIE.document.all.Item("cat").selectedindex = "Other PC Devices"
objIE.document.all.Item("pricebudget").Value = "10880"
objIE.document.all.Item("con").selectedindex = "Brand New"
objIE.document.all.Item("warranty").selectedindex = "Shop Warranty"
objIE.document.all.Item("postspan").selectedindex = "Expire after 15 days"
objIE.document.all.Item("caption").Value = "Brand new, 1 year warranty, price is 10,880 free delivery. Supports Cloud Technology"




call objIE.document.all.Item("submit").click
Set objIE = Nothing


In the very beginning i encountered problems Its seems those combo boxes are not responding with my script.

Can someone share an idea.

This post has been edited by Atli: 10 May 2014 - 03:39 AM
Reason for edit:: Fixed the [code] tags. We use BBcode, not HTML.


Is This A Good Question/Topic? 0
  • +

Replies To: Auto fill in web form using VB Script or VB.NET

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9487
  • View blog
  • Posts: 35,767
  • Joined: 12-June 08

Re: Auto fill in web form using VB Script or VB.NET

Posted 16 May 2014 - 06:40 AM

Curious side question - what's up with the app? Automated account generation or something?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1