SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Multiple CheckBoxes in a JavaTable - How to get it

    Hi Guys:
    I have an application in JAVA. I'm using QTP 11

    I have a JavaTable that has a lot of rows and 2 columns (0 and 1).
    Some of the rows in column 1 have 1 Checkbox and some multiple.
    If i use GetCellData, i have 0 or 1 if only 1 checkbox is in the cell. If i use in a Row with muliple checks and allways have 0.
    Now, per Spy, the JavaCheckBox is below the JavaWindow. It is
    JavaWindow("").CheckBox("")
    when i record, the recording is
    JavaWindow.JavaTable.SelectRow #x
    JavaWindow.JavaCheckBox.set xxxxx

    When i try to get the value i make
    JavaWindow.JavaTable.SelectRow #x
    JavaWindow.JavaCheckBox.GetRoProperty(value) but it says that the checkbox doesn't exist. ONLY if i go and click on the checkBox in this row, QTP see it.

    I tried ActivateCell and click cell but nothing happends.

    Can somebody help me?

    Thanks

  2. #2
    Senior Member
    Join Date
    Oct 2008
    Posts
    128
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple CheckBoxes in a JavaTable - How to get it

    your issue is more like object identification. try using index and location number to identify multiple check boxs uniquely.

    Another issue could be since your check box is embedded into Cell box, you may need to use getcelldata (or getcelltext) methods to get checkbox values.

    post your attachment to assist you better.

  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple CheckBoxes in a JavaTable - How to get it

    Hi:
    Thanks for you answer.
    GetCellText is not supported for JavaTable.
    And GetCellData give me the checkbox value ONLY where there is only 1 checkbox into the cell. When i have more than 1 i only have 0 always.
    If i make manually a click on the checkbox i can identfy it, but ClickCell, ActivateCell doesn't work for that.
    I will attach the table.

    Thanks
    Attached Images Attached Images

  4. #4
    Senior Member
    Join Date
    Oct 2008
    Posts
    128
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple CheckBoxes in a JavaTable - How to get it

    It seems like your check boxes have nothing to do with your table. you have to identify each check box uniquely and your problem will be solved .
    for Example
    JavaWindow.JavaTable.SelectRow 0
    msgbox JavaWindow("").JavaCheckBox("to_class:=JavaCheckBo x","Another_Unique Property:=Value","index:=0").GetRoProperty(value)

    Spy on two or more checkboxes and look their properties closely they should be different. use that property and value to defined them

  5. #5
    Junior Member
    Join Date
    May 2012
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple CheckBoxes in a JavaTable - How to get it

    Thanks again:
    The issue is that they are all the same. It depends on what row is selected, but if i make the selectRow and then try to get the CheckBox, QTP says that object doesn't exist. It only exists if i click on the checkbox. It's weird. Doesn't have location neighther index [img]/images/graemlins/frown.gif[/img]

    I'm really lost

  6. #6
    Senior Member
    Join Date
    Oct 2008
    Posts
    128
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple CheckBoxes in a JavaTable - How to get it

    Index and location are ordinal properties which are not going to be visible in GUI SPY; even if you have all the check boxes are same values (check path and path finder string). location and index are going to be different for each check box.
    Please attach spy values for two checkboxes including long string values.

  7. #7
    Junior Member
    Join Date
    May 2012
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple CheckBoxes in a JavaTable - How to get it

    I can't catch with SPY bcz SPY only see JavaTable.
    The only way to see properties is Recording and looking into Inventory.
    And into Inventory every CheckBx that i select have is linked into SAME object. Attaching properties.

    Thanks
    Attached Images Attached Images

  8. #8
    Senior Member
    Join Date
    Oct 2008
    Posts
    128
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple CheckBoxes in a JavaTable - How to get it

    oh k.
    look at x and y values for check box 1 and x and y values for check box 2.
    msgbox JavaWindow("").JavaCheckBox("to_class:=JavaCheckBo x","x:=0","y:=1","index:=0").Exists

    msgbox JavaWindow("").JavaCheckBox("to_class:=JavaCheckBo x","x:=1","y:=1","index:=0").Exists

    so you are trying to say that x and y values and path values for each and very check box is same?
    thats strange to me..
    You can talk to your developer and explain him or her that you need to identify object as a first step and if they can add developer name for each check box uniquely so you can identify the objects..

    also compare path for each object there should be one value in that string which makes them unique.

 

 

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 11.11%
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 06:52 PM.

Copyright BetaSoft Inc.