Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combo Box-es in table
#1
Not Solved
Hi all!

I'm using QTP with Java plugin to test Java applications. The problem is that in one JTable I have Combo box-es (one Combo Box in every cell of one column) and they were not learned in Object Repository. I solved part of that problem by adding table toolkit under "Controls to identify as separate test object". By adding that I could record on Combo Boxes, but it wouldn't be any difference between them and I would still get error that object cannot be identified when running the test...

I've also tried this:

Code:
Set table = JavaWindow("Element").JavaTable("BoardsTable").Object
Set JTableCS = table.mic_get_supp_class()
Set comp = JTableCS.getComponentAt(table, 7, 2)
                  
comp.setSelectedIndex(1)
comp.setSelectedItem("4")
But although there is no error, item in combo doesn't change.

Thanks for your help!
Reply
#2
Not Solved
Could somebody please help me? I've tried everything I could think of but still can't find solution...
Reply
#3
Not Solved
Hi ,

Try as given below.

Code:
JavaWindow("Element").JavaTable("BoardsTable").ChildItem(row,col,"JavaList",0).Select "4"
Reply
#4
Not Solved
Hi, thanks for your reply!

This doesn't work, and I think because ChildItem function doesn't exist for JavaTable, it is for SAPTable.

Basically, my problem is that I can't learn Combo boxes in object repository. If I try to learn combo box in JTable it only sees it (and learns) as JavaTable and not JavaList...

I've spend a lot of time trying to figure that out and would appreciate any help I can get!
Reply
#5
Not Solved
HI Pero,

Yes, you are correct. ChildItemmethod is not applicable for JavaTable,OracleTable,SwfTable objects so on so forth and it is applicable for SAPTable(SAP Web),WEBTables.

Hope you have selected "Context Sensitive" radiobutton from Tools > Options > Java tab > Advanced Button > Advanced Java > Record & Run Settings > Under Java Table Record Mode.(Since SetCellData, SelectRow so on could not be used when the JavaTable record mode is set to "Analog").
Reply
#6
Not Solved
Hi Chilam,

Yes, I did that, and when I record on Combo boxes I get this:

Code:
JavaWindow("192.168.40.124 - RXI Element").JavaTable("BoardsTable").SelectRow "#10"
JavaWindow("192.168.40.124 - RXI Element").JavaList("JComboBox").Select "Etmc41"
JavaWindow("192.168.40.124 - RXI Element").JavaTable("BoardsTable").SelectRow "#11"
JavaWindow("192.168.40.124 - RXI Element").JavaList("JComboBox").Select "Etm4"
JavaWindow("192.168.40.124 - RXI Element").JavaTable("BoardsTable").SelectRow "#12"
JavaWindow("192.168.40.124 - RXI Element").JavaList("JComboBox").Select "Etm4"

First, it makes no difference between different combo boxes (I've recorded on three combo boxes), and second, I get error that it cannot identify the object "JComboBox"...
Reply
#7
Not Solved
Please, please help me!
Reply
#8
Not Solved
Hi

The post is old but i have the same problem. The QTP 11 has some supplementary option in the JAVA area of menu tools/option. There are some options in which you can set how java object are detected in a table cell. You can set to see the object as separate object. Maybe this is the solution or at list part of the solution
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Find Combo Box length? AndyBSG 3 4,046 12-05-2014, 10:02 PM
Last Post: AndyBSG
  Combo Box selection issue Shkumari 11 12,815 09-26-2013, 03:56 PM
Last Post: learnQtptips
  Unable to select a combo item by value or index martinshort 2 3,575 08-26-2013, 07:55 PM
Last Post: sudhirzpatil
  how to automate combo box in a application using qtp ricks_ngl 0 3,439 07-20-2012, 10:59 AM
Last Post: ricks_ngl
  Default value in Edit Box when Check Box is checked nacchio 2 5,105 07-18-2012, 12:21 PM
Last Post: sree.85

Forum Jump:


Users browsing this thread: 6 Guest(s)