SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,596
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Xpath automation Approach

    Knowledge of Xpath automation Approach

    I saw this in a QTP job posting. What does it mean?

    Thanks,

    Kevin

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Using xpath identifiers instead of the "traditional" mappings in qtp. It has been used in Selenium for awhile and QTP added it with version 11 if I recall.
    Xpath based Identification in QTP 11.0
    XPath Syntax

    Probably means whatever app they are testing has dynamic javascript objects that can't be reliably uniquely identified otherwise. There are a number of web development frameworks that are doing that these days.
    Last edited by NoUse4aName; 08-24-2013 at 07:49 AM.

  3. #3
    SQA Knight
    Join Date
    May 2006
    Location
    Playa Del Rey, California, United States
    Posts
    2,592
    Post Thanks / Like
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    xpath is used as a locator in any xml or DOM based structure.

    Besides HTML pages, it's also used for validating XML documents and SOAP web services.
    David Lai
    SDET / Consultant
    LinkedIn profile

  4. #4
    New Member
    Join Date
    Aug 2013
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    easy way to validate the SOAP responses in UFT with user code in C#.

  5. #5
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,596
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    I understand how the XPATH syntax works and how to use it from reading the articles from NoUse4AName. How do we find out the xpath of the object?
    Do we look at the source code, use a key combination(I forgot it) that shows the XPath, Firebug? F12 in IE?
    How do I get to know what the path of the object is?
    Can we ask qtp to learn the xpath when learning an object in the OR or when it is in record mode?
    Thanks,

    Kevin

  6. #6
    SQA Knight
    Join Date
    May 2006
    Location
    Playa Del Rey, California, United States
    Posts
    2,592
    Post Thanks / Like
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    You can install xpath checker plugin for your browser (there's tons of them out there, which basically work in the same way). However, those will usually return a xpath using hard index, from there, you'll want to shorten the xpath using intelligent selectors.

    Here's some tips on shortening xpath, Engineering Quality: 3 Useful Techniques to shortening your xpath
    David Lai
    SDET / Consultant
    LinkedIn profile

  7. #7
    Member
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    318
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    how would you code this xpath using DP?

    Set obj_WebLink = Description.Create
    obj_WebLink ("micclass").value = "Link"
    obj_WebLink ("name").value= arrData(0)
    Set oColl = Browser("micclass:=Browser").Page("micclass:=Page" ).ChildObjects(obj_WebLink)
    iCount = oColl.Count
    so instead of obj_WebLink ("name").value= arrData(0)

    I want to use the xpath in the code

    this is the xpath .//*[@id='Li1']/a

  8. #8
    Member
    Join Date
    Jun 2012
    Posts
    80
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Hello All,

    What if the tables/elements are generated dynamically...on the screen as per the parameters...
    In thact case the given XPATH might be incorrect...

 

 

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:16 PM.

Copyright BetaSoft Inc.