SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,485
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Index, html id, xpath are all dynamic. How do you handle them in UFT?

    Happy New Year everyone
    We have this 3rd Party app we are testing with the following description:
    - app uses only one page and objects just keep set to be visible and non-visible
    - indexes keep changing each time the app is launched
    - html id property values keep changing too
    - xpath property values uses the values from html ids so they keep changing each run too
    - many objects have no unique names/identifiers (Samples: webtable A has name "Web Table", webtable B has name "Web Table", button A name = "button", button B name = "button", etc.)

    How do you handle this type of app in UFT?
    It would be nice to see solutions especially for the chaning indexes and html ids and xpaths.
    If you've worked on similar app(s) before, please provide sample solutions.

    Thanks.
    Gilbert

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,645
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Haven't tried to solve that with UFT before but did with Selenium. App was powered by ExtJS framework which has all those dynamic identifier issues. Everything was just random web elements like ext-asdya98f67daf. For some things the best solution was to have developers insert a custom css class we could use(automationID or whatever) which worked for common elements but devs were not down with doing that for all objects in the app. Overall the best solution was to use javascript to query the framework for the objects themselves and return an id, which was then used by automation. Did require extensive developer assistance to arrive at the solution.

  3. #3
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Florida, United States
    Posts
    2,792
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Blog Entries
    1

    Totally different approach

    Perhaps use a graphic testing tool that does not rely on object recognition at all.
    There are graphic test tools such as Citrapro that cut out rectangles of the screen along with "dont care" mask areas. The graphics can be anyplace on the display and these tools will find them. I have looked at this in 2001 and I liked it except that at the time there was not a way to step through code for debugging like we can do in UFT and Selenium/Eclipse. By now the tool can probably do this.
    Another choice is Eggplant but it used to only be for Apple. There are probably other similar tools by now.
    Thanks,
    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

  4. #4
    Advanced Member
    Join Date
    Aug 2004
    Location
    Wellington, New Zealand
    Posts
    853
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    If you're working with a table, you could try using the column names.
    Otherwise, I would probably use Insight in conjunction with Visual Relation Identifiers so that I could work semi-graphically.

    Visual Relation Identifier Dialog Box
    Regards,

    Alex
    ... just another Tester ...

  5. #5
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,485
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Thanks everyone for your replies.
    Kevin: A graphical test tool may work well for clicking on objects and such but if you try to retrieve property values, it may not work as well.
    Alex: Yes, I use Insight Objects for the graphical representation of buttons such as First, Previous, Next, Last for page display of web table items since their indexes keep changing depending on which web table was displayed first or second or last, Visual Relation Identifiers, and DP (Descriptive Programming) and they do work with extra time spent on the problematic objects when they could have been much easier to work with IF the developers had assigned unique names or html ids.
    Another strange behavior with this Third-Party app is that the normal .Click or .RightClick and so on does not work with many objects. We ended up using Setting.WebPackage("ReplayType") = 2 plus the .FireEvent "ondblclick", for example, then setting it back to = 1.

    I just thought that there is a way via using GetTOProperty to get the current value of the 'always changing' index or html id or xpath of an object and somehow be able to use that value to identify the object.

    Thanks again !!
    Gilbert
    Last edited by Gilbert; 01-08-2018 at 01:16 PM. Reason: additional info

  6. #6
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,645
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    GetTOProperty just gets the values of the test object(as defined in code or Object Repo) nothing to do with application under test side.

  7. #7
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,847
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Are you able to identify the objects by using Insight or attached text?

    Mark Smith.

  8. #8
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,485
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Hi Mark,

    AUT uses only one page. Depending on what tab or link is clicked, the screen will be filled with different tables/grids. At the bottom of each table, the icons (no labels) for First, Prev, Next, Last page are displayed for those grids/tables that have multiple pages. Some grids/tables only display up to 10 items or rows at a time; others up to 50. The only unique property the Spy tool can see is the Index and the y or absolute_y values. If a grid/table is only 1 page, these icons are not displayed. If grid/table #1 has the icons displaying, the indexes for each icon/button will be 1, for the #2 grid/table the index will be 2. If at next runtime, grid/table #1 has only 1 page and the icons are not displayed, the icons/buttons for grid/table #2 will now have the indexes of 1. This applies to the remainder of the grids/tables underneath the first two tables. The developers of this 3rd Party app decided to use a generic name for these objects/icons like if it's image the name is called "image", if it is button the name is called "button" instead of "Prev_Button" or "Next_Button", etc. The worst scenario is if one or two of the tables/grids are not displayed on the screen (depending on what tab or link was clicked), then the indexes are really unpredictable. There's an example of the issue with dynamic indexes.

    Using Insight works if the icons/buttons are always in the same area (coordinates) of the screen but, they are not. As you scroll up and down the screen, these icons/buttons can be anywhere on the screen.

    Similar issues with the web tables containing the same columns. Indexes, html ids, xpaths are always changing each runtime and no other properties make them unique.

    Thanks.
    Gilbert

  9. #9
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Florida, United States
    Posts
    2,792
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Blog Entries
    1
    Gilbert,
    Insight in UFT is limited. The idea was taken from other products that work entirely with imaging and without object properties at all. If you get the chance to try a totally image based testing tool you will see that HPE added it in as a quick fix that barely does anything. If you cannot get UFT to work in your situation you might want to look at CitraTest or some other tool. I think cucumber works like this also.
    It is true that if you work with an image based system you will not see the internal properties of objects. But in some cases the properties are not being represented correctly any way.
    Thanks,
    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

  10. #10
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,485
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Hi Kevin,

    The use of Insight works well on objects where I just need to perform like a "click" or "select".
    But, with other objects such as tables and you need to get some values, you can't use Insight objects.
    Alex mentioned about the use of columns but this 3rd Party app have many tables and some of them have the same columns so again, the ever changing indexes, html ids, xpaths, etc. comes into play.
    When you Spy on them, the main difference you'd see is in x, y or absolute_x, absolute_y property values where depending on how much the tables/grids are scrolled in the screen, these values do change too.

    *Just found out the other day that the company who created this app has only 3 QA people and no automation at all. That explains why the app, we ended up getting/buying, was not designed at all with "test automation" in mind.

 

 
Page 1 of 2 12 LastLast

Tags for this Thread

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.40 (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:46 PM.

Copyright BetaSoft Inc.