Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2006, 02:38 PM
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using mydate in a dropdown list

I’m trying to automate using Mercury QTP. I have a web page that has two dropdowns.

The first dropdown has only one value (ie, ABC 08/30/2006) where the Date changes everyday. I’m confused as to how to code this. If I code it with todays date, the code produced is such:

Browser("XXXX").Page("XXXX").Frame("mainFrame_8"). WebList("event_id").Select "Campus Interview 08/23/2006"

However when I run the automated script tomorrow, it will fail because the date is incorrect. How do I code so that the date changes daily?
---------------------------------------------------------------------

Also, I have a second dropdown on this same page, which populates only with todays (current) date: (ie, 08/30/2006)

The code I use for it is such, and works fine.

Dim MyDate
MyDate = Right("0" & Month(Date), 2) & "/" & Right("0" & Day(Date), 2) & "/" & Year(Date)
Browser("XXXX").Page("XXXX").Frame("mainFrame_8"). WebEdit("appraisal_date").Set (MyDate)

Can someone possibly assist me? It would be greatly appreciated!

Thanks!







Similar Threads
Thread Thread Starter Forum Replies Last Post
Dropdown list maha .NET Framework 2.0 7 April 28th, 2007 12:32 AM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM
HELP WITH DROPDOWN LIST enavas Excel VBA 1 April 6th, 2004 02:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.