Solved

VBS script for Browswer Automation

Posted on 2014-03-09
1
211 Views
Last Modified: 2014-03-18
I'm working on an VB script to automate my web browsing. I figured out how to open the internet explorer, log on, and then click on the necessary objects to navigate. What i'm having trouble with now is my drop down box that I have to select. I can select a static variable from the dropdown but the variables change constantly so it won't work every time.

The way that the ASP web application works is that once I select an item from the dropdown box, I click on a reset link and then the item that I selected from the dropdown box disappears. They are all Date Time variables so it changes all the time.

So I'm trying to figure out how to select the very bottom selection item in the drop down box because that will reset all items and clear my queue. Is this possible? If not how do I loop the process until all the DATE TIME item variables are reset and removed.
dropdownbox.jpg
0
Comment
Question by:Southern_Gentleman
1 Comment
 
LVL 2

Accepted Solution

by:
gdarcan earned 500 total points
ID: 39916831
Hi;

You should use VBScript's sh.sendkeys method. "sh" is the common object variable for "Wscript.Shell". With this method, you can send keystrokes for example "tab" to switch between input fields, "down arrow" to go end of the list. Just add a "For i=1 to 100" loop to go end of the select list.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question