SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Apprentice
    Join Date
    Dec 2007
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Object Identification in TestComplete

    Hello All,

    To enter value the username textbox on Gmail site using QTP.. I'll write something like...

    Browser("name:=Gmail.*").Page("title:=Gmail.*").We bEdit("name:=username").set "myusername"

    How can i do the same thing in TestComplete? If I spy this object in TC, it gives me this code...


    Sys.Process("iexplore").Page("https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm= false&continue=http%3A%2F%2Fmail.google.com%2F mail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=zpwhtygjntrz& amp;scc=1&ltmpl=default&ltmplcache=2").Tab le(1).Cell(1, 1).Panel("login").Form("gaia_loginform").Panel("ga ia_loginbox").Table(0).Cell(0, 0).Panel(0).Table("gaia_table").Cell(2, 1).Textbox("Email")



    1. How can I reduce the length of this code
    2. How can i write script without recording (like DP in QTP)
    3 How can I use regular expression, as used in above qtp code?

    Please help...

    Regards,
    Abhikansh

  2. #2
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Identification in TestComplete

    Hi Abhikansh,

    You need to use the Find method to search for your text box by its name. Try something like this:
    <font class="small">Code:</font><hr /><pre>...
    // JScript
    var page = Sys.Process("iexplore").Page("https://www.google.com/*");
    var textbox = page.Find("NativeWebObject.id", "Email", 20);
    if(textbox.Exists)
    {
    // use the text box
    }
    ...</pre><hr />
    Jared - AQA Support

  3. #3
    Apprentice
    Join Date
    Dec 2007
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Identification in TestComplete

    thanks Jared... let me try it.. n i'll tell the outcome...

  4. #4
    Apprentice
    Join Date
    Dec 2007
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Identification in TestComplete

    thanks Jared. its working...!!

 

 

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 11.54%
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 06:57 PM.

Copyright BetaSoft Inc.