SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jul 2005
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Dynamic Objects in Web Application

    Hi,

    I have this situation where each time I add a new product, the product # then appears in a htmltable in the form of a hyperlink.

    Now, when I try to click on this new object, WR says that it cannot find the object. In this case I cannot use regular expression bcoz, it results in more than one objects, leading to an ambiguity for WR not knowing which one to select.

    Do we have other alternative to handle this ?

    Thanks.

  2. #2
    Moderator
    Join Date
    Mar 2000
    Location
    Orange County, CA
    Posts
    3,187
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects in Web Application

    you can either reference the objet with the exact physical name, or with the inclusion of a regular expression as you have mentioned.

    If you can provide examples of the descriptions of the items you are noticing them being changed each time, and other items which WInRunner can't uniquely identify if you use a REGEX, maybe we could help pinning it down, but at this moment there really isn't enough information for us to help you work around the issue. Flying blind.
    Insanity: doing the same thing over and over again and expecting different results

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Boston, MA
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects in Web Application

    Yoyu could use regular expression for the 'html name' property and then add 'location' property to uniquely identify the link.
    location: 0 would point to the first link.

  4. #4
    SQA Knight
    Join Date
    Jun 2002
    Location
    Cupertino, CA, USA
    Posts
    2,164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects in Web Application

    Use web obj get child item.
    For example, if the new link always appears in column1 of the last row of the table, you could do something like this:

    tbl_get_rows_count("YourTable",rows_count);
    web_obj_get_child_item("YourTable",rows_count,1,"h tml_text_link",0,child);
    web_link_click(child);

  5. #5
    Moderator
    Join Date
    Mar 2000
    Location
    Orange County, CA
    Posts
    3,187
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects in Web Application

    If it is embedded in a table, you are going to have to go through each cell and pull in the child item to find the link's identification information (as bpolitzer has stated).

    With this, you can then act on the physical description of the item instead of relying on it being contained in the GUI Map file, which from what you have said changes each time.

    This means though that you will need to come up with the pattern to determine what link that is pulled back from the table is the correct one for each cell's contents to be compared.
    Insanity: doing the same thing over and over again and expecting different results

  6. #6
    Member
    Join Date
    Jul 2005
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects in Web Application

    Main problem I am facing with the above situation is that WR is looking for this hyperlink object in GUI Map File and shows a window with the hand icon to point to the object to learn its properties.

    Eventhough, I identify the location of this hyperlink in the htmltable (the position of this link is again dynamic which is based on the alphabetical order), I still would encounter the same msg that it cannot identify the object.

    To overcome this, the only means to my knowledge is make WR lean this object dynamically may be with GUI_Add. I tried this, but it didn't work for me.

    Any other suggestions ???

  7. #7
    SQA Knight
    Join Date
    Jun 2002
    Location
    Cupertino, CA, USA
    Posts
    2,164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects in Web Application

    Can you get the new product number through a db query? Maybe you can do something like this:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">db_connect(&quot;query1&quot;,&quot;My ConnectString&quot;
    db_execute_query(&quot;query1&quot;,&quot;select product_num from orders where name = 'jones'&quot;,record_num);
    product_num = db_get_field_value(&quot;query1&quot;,&quot;#1&quo t;,&quot;#1&quot;
    web_link_click(&quot;{class: object,MSW_class: html_text_link,html_name: &quot; &amp; product_num &amp; &quot;}&quot;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

 

 

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 10.00%
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 04:31 AM.

Copyright BetaSoft Inc.