SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Apr 2004
    Location
    India
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Finding ItemID - Web Testing

    For ComboBoxes displayed in IE TC finds it as given below

    Window("Internet Explorer_TridentCmboBx", "", 1)

    But there is also an DOM item associated with this control. If the control is named in the source html file it is easy to find that object by name. But if it is unnamed how to find the exact item and its id from the object browser. Even the TC record option senses the control as window object as given above.
    Umakanth Srinivasan
    SQA

  2. #2
    Senior Member
    Join Date
    May 2002
    Location
    Las Vegas, NV, USA
    Posts
    499
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding ItemID - Web Testing

    Hi Umakanth,

    For ComboBoxes displayed in IE TC finds it as given below

    Window("Internet Explorer_TridentCmboBx", "", 1)

    But there is also an DOM item associated with this control.
    <font size="2" face="Verdana, Arial, Helvetica">This is correct - Internet Explorer creates windows for combo boxes.

    Even the TC record option senses the control as window object as given above.
    <font size="2" face="Verdana, Arial, Helvetica">I've created a simple html page with one combo box and tried to record a script with it. TestComplete recorded the item selection from the combo box as follows:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> Call window.document.all.item(4).Click(&quot;4&quot</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">To create the combo box I used the standard SELECT tag:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">&lt;select size=&quot;1&quot;&gt;
    &lt;option value=&quot;&quot;&gt;1&lt;/option&gt;
    &lt;option value=&quot;&quot;&gt;2&lt;/option&gt;
    &lt;option value=&quot;&quot;&gt;3&lt;/option&gt;
    &lt;option value=&quot;&quot;&gt;4&lt;/option&gt;
    &lt;/select&gt;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Could you please send me the link to a Web page, where I can recreate the behavior you described?
    Regards,
    Bobby Edgar
    Olagoo.com
    Save on AutomatedQA Products

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    India
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding ItemID - Web Testing

    <select name="title">
    <option value="Smt1" >Smt1</option>
    <option value="Smt" >Smt</option>
    <option value="Smt2" >Smt2</option>
    <option value="Mr" >Mr</option>
    <option value="Mrs" >Mrs</option>
    <option value="Ms" >Ms</option>
    </select>

    Even, I have the alike code snippet to produce the list box but the output is

    Call p.Window("ComboLBox", "", 4).Click(41, 21)

    when recorded.

    I feel that I have not done some custom setting in TC to enable this action.
    Umakanth Srinivasan
    SQA

  4. #4
    Senior Member
    Join Date
    May 2002
    Location
    Las Vegas, NV, USA
    Posts
    499
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding ItemID - Web Testing

    Hi Umakanth,

    I assume that we are trying to record the script on different Web pages and this is the cause of the different results.
    I recorded the script below with the combo box from your previous post:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Sub Test1
    Set p = Sys.Process(&quot;iexplore&quot
    Set w = p.Window(&quot;IEFrame&quot;, &quot;*&quot
    w.Activate
    Set window = w.Page(&quot;*&quot.ToURL(&quot;http://www.qaforums.com/cgi-bin/foru...t=000204&quot;)
    Call window.document.all.title.Click(&quot;Ms&quot
    End Sub</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">If the problem does not appear with the QAforums Web page, please give me a link to a page where I can recreate the problem. Thanks in advance.

    BTW, are you sure that the "Web testing" plug-in is installed in TestComplete (File | Install Extensions...)? I tried to disable this plug-in and record the same actions with the combo box from your post and here is the resulting script:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Sub Test2
    Set p = Sys.Process(&quot;iexplore&quot
    Set w = p.Window(&quot;IEFrame&quot;, &quot;*&quot
    w.Activate
    Call w.Window(&quot;Internet Explorer_TridentCmboBx&quot;, &quot;&quot;, 3).Click(53, 7)
    Call p.Window(&quot;ComboLBox&quot;, &quot;&quot;, 3).Click(45, 9)
    End Sub</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    Regards,
    Bobby Edgar
    Olagoo.com
    Save on AutomatedQA Products

  5. #5
    Member
    Join Date
    Apr 2004
    Location
    India
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding ItemID - Web Testing

    I had this problem when I am experiencing XP problems. Now, When tried recording I am getting the control names.

    Thanks for your follow up.
    Umakanth Srinivasan
    SQA

  6. #6
    Senior Member
    Join Date
    May 2002
    Location
    Las Vegas, NV, USA
    Posts
    499
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding ItemID - Web Testing

    Hi Umakanth,

    It is nice to hear that the problem does not exist any more.
    Thanks for letting me know the results.
    Regards,
    Bobby Edgar
    Olagoo.com
    Save on AutomatedQA Products

 

 

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 © 2017 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 © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:32 AM.

Copyright BetaSoft Inc.