SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    May 2008
    Location
    Beaver Dam, WI USA
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Tutorial Modification

    Hey everybody! got a question about the HP tutorial. I tried modifying it a bit so that it would work at anytime not just for that test run. Part I was at was the function call and instead of using "12/29/2008" as the object name I decided to use the descriptive programming I read about thanks to TReddy.

    Here is what I have but don't think I'm using it right:

    format for the date is mm/dd/yyyy

    <font class="small">Code:</font><hr /><pre>
    Dim obj_Descrip
    Set obj_Descrip = Description.Create
    obj_Descrip("name").value = "/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/"

    departureDate= Browser("Select a Flight: Mercury").Page("Select a Flight: Mercury").WebElement(obj_Descrip).GetROProperty("i nnertext")
    'departureDate = "12/29/2008"

    If check_data_validity( departureDate ) then
    reporter.ReportEvent micPass, "Date is valid" , departureDate
    end if
    </pre><hr />

    Also there are two date objects on the screen one for departure and one for arrival. I would assume you could use indexing to distinguish between the two, but how does the program know the indexes? is it by physical location or by declaration in the html. Any help would be greatly appreciated.

    Thanks,
    TraumaER [img]/images/graemlins/cool.gif[/img]

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Tutorial Modification

    For that you need to use ChildObjects

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:17 PM.

Copyright BetaSoft Inc.