SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    May 2004
    Location
    Germany
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Robot Identification of Dynamic HTML Objects

    Hello!

    I am testing a Web Application with Dynamic HTML Content. I need to create Verification points for several tables, labels and so on.

    The problem is:

    The content of the Application changes often. Robot identifies elements via an index. The index is created by the browser and enumerates the objects.
    If the content changes, the index number for the elements changes. Robot cannot identify the items anymore. I already looked into the manuals and realized that the object recognition order can be changed in Rational Robot. But this does not help me because I can use neither Object name, text bor id. How can I make sure that the recorded index of the element is always correct for the elements index when playing back the script?

    I am using the old verison of Robot, version 2003.06.00.436.000.

    Example of element with problems as described above:
    Result = HTMLTableVP (CompareProperties, "Index=48", "VP=Object Properties6")

    This is an excerpt of a script I recorded yesterday. Today the index of the table I wanted to have the VP for is 52 and I cannot use the formerly recorded script.

    Hope anyone can help me, this is an ****** problem. Maybe there is another solution to this problem that I have not seen yet?

  2. #2
    Member
    Join Date
    Feb 2004
    Location
    Chennai
    Posts
    63
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Robot Identification of Dynamic HTML Objects

    Did u try using 'Name' Property to identity the objects? Because each object will have an unique internal object name.

    Instead of using direct VP, create it programatically.

    Use the below code to identify the object
    Dim ChildRec() As String

    If SQAGetChildren("\;Type=;CurrentFocus}", ChildRec) = sqaSuccess Then

    For nChildedit_cnt = 0 To UBound(ChildRec)
    iResult = SQAGetProperty (ChildRec(nChildedit_cnt), "Name", sObjectName)
    'SqaConsoleWrite Childrec(n)
    If sObjectName = "EXPECTEDOBJECTNAME" Then

    'Do the necessary action
    Exit For
    End If

    nEdit_Cnt = nEdit_Cnt + 1

    Next nChildedit_cnt
    Hope I've understood the problem correctly
    _Raji

  3. #3
    Junior Member
    Join Date
    May 2004
    Location
    Germany
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Robot Identification of Dynamic HTML Objects

    did not expect getting an answer. Will try your solution, if I cannot solve my problem with this, I will contact the supporting team.Thank you very much!

  4. #4
    Junior Member
    Join Date
    May 2004
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Robot Identification of Dynamic HTML Objects

    ChinChiller-

    Let me know if it works. I have the exact same problem, and IBM told me that it is one of the things ROBOT doesn't handle.

  5. #5
    Junior Member
    Join Date
    Dec 2003
    Location
    Bangalore
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Robot Identification of Dynamic HTML Objects

    hi Chinciller and Mike,

    When ever you code, make your robot code as flexible as possible so that it should work in any conditions. if you have an index to verifucation, get the value of that from the page. First get the property of the object like setframe and the name or id using the object properties in rational. Then find the for the value innerHTML, in which you have the index, rowid's,etc. Write a simple function to find the specific value with a key string and get the index of that and pass it to the verification point. I have done it quite number of times. So what ever i told is quite generic. Because i didnt gave any sample code you will be confused. If you come to yahoo chat i could explain better online, my id is bobby330@yahoo.com Or post your reply with your queries.
    Given below is an example.

    i_Result=SQAGetproperty ("Type=HTMLFrame;HTMLId=fraFrame;\;Type=HTMLActive X;HTMLId=tbContentElement","innerHTML",s_Value)

    from s_value i wrote a sample function to find the index.

    Let me know if this helps.

    did you try with Raji's suggestion


    Thanks,
    Sekhar

  6. #6
    Junior Member
    Join Date
    May 2004
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Robot Identification of Dynamic HTML Objects

    I am confused.

    On my page, I have a few different cases where Robot will not understand the objects. On one page, it is a .NET application that has some check boxes on them.

    These checkboxes appear on the page, depending on the permissions from the selected record. When walking through the page (mentally), you select a specific record from a drop down list. Once that record is selected, it then modifies the page layout to give appropriate choices based off that record.

    So, if I select the record XYZ, I will have 4 check boxes appear on the screen after the refresh.

    If I do an inspector on them, here is what I get for the main level:

    CheckBox,Name=UCInvestments:rptTradeTypes:_ctl2:ch kTy

    When further looking through the properties, if I drive down the object hierarchy, I can get to a field labeled "name", under the "properties" list.

    So:

    CheckBox,Name=UCInvestments:rptTradeTypes:_ctl2:ch kTy ---> Properties ---> name = UCInvestments:rptTradeTypes:_ctl2:chkType

    Now, if I tell robot to do the following command:

    CheckBox Click, "Name=UCInvestments:rptTradeTypes:_ctl1:chkTyp e"

    OR

    CheckBox Click, "Name=UCInvestments:rptTradeTypes:_ctl2:chkTy"

    The robot will stall out. It cannot find this object.

    Of the 4 check boxes listed on the screen, they are labeled (for example purposes): ABC, DEF, GHI, JKL.

    The properties for each are:

    (ABC Box name = UCInvestments:rptTradeTypes:_ctl1:chkType
    (DEF Box name = UCInvestments:rptTradeTypes:_ctl2:chkType
    (GHI Box name = UCInvestments:rptTradeTypes:_ctl3:chkType
    (JKL Box name = UCInvestments:rptTradeTypes:_ctl4:chkType

    The naming convention is the same, except the _ct1X increments. Now, what happens if I modify this record (i.e. in our database) to remove one of the permissions of any checkboxes? For example, the record which the page was modifying no longer has access to the check box "DEF".

    What should happen to the naming conventions of these boxes?

    Well, after removing that box from appearing, the names adjust themselves accordingly.

    (ABC Box was:
    name = UCInvestments:rptTradeTypes:_ctl1:chkType
    and is now: name = UCInvestments:rptTradeTypes:_ctl1:chkType

    (GHI Box was: name = UCInvestments:rptTradeTypes:_ctl3:chkType
    and is now: name = UCInvestments:rptTradeTypes:_ctl2:chkType

    (JKL Box was: name = UCInvestments:rptTradeTypes:_ctl4:chkType
    and is now: name = UCInvestments:rptTradeTypes:_ctl3:chkType

    Notice the numbers changed. Well, regardless, Robot wont even recognize these objects at all on the page; even keeping them the same.

    Ideas?

  7. #7
    Junior Member
    Join Date
    Apr 2004
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Robot Identification of Dynamic HTML Objects

    Hey Mike,

    I had a similar problem with my application. I created a function that returned the index number of the option I wanted. For example I want to select the GHI box. The function when use a do until cannot find. Start with the lowest number that is valid (1 or 2) the sqaGetProperty. If the property matches then you return the index of that control. It really sucks but it works.

 

 

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 © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.38%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (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 04:27 PM.

Copyright BetaSoft Inc.