Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting a cell from Javatable at RUN time
#1
Not Solved
Hi All,

I have a javatable.After searching for a text in the table,for the row where I have found the text,I want to select its column(which is basically a button),but I am unable to do so.
I havw written following code.

Code:
intSchCount =  JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").GetROProperty("rows")

Scheme = DataTable("Scheme",dtLocalSheet)

For i = 0 to intSchCount-1
Sch=JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").GetCellData(i,"A")
                    
If (Sch=Scheme) then
JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").SetCellData "#i","C","1"
                               Exit for
end if
Next


**************************

I am getting following error:
The operation cannot be performed
Line (126):
Code:
"JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").SetCellData i,"C","1"".
**********************************

What wrong am I doing?What is the other way to select the column?[/align]
Reply
#2
Not Solved
Try with the below code:

Code:
intSchCount = JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").GetROProperty("rows")

Scheme = DataTable("Scheme",dtLocalSheet)

For i = 0 to intSchCount-1
Sch=JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").GetCellData(i,"A")

If (Sch=Scheme) then
JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").[b]ChildItem(i,"C","JavaButton",0).Click[/b]Exit for
end if
Next
Reply
#3
Not Solved
****************************
Thanks for your effort and time.
It is not the child item.The code doesnt help Sad
Reply
#4
Not Solved
Apolozies Arjun.
ChildItem method is not applicable for JavaTable, it is applicable for SAPTable(SAP-Web),WebTable

will revert to you if I have a solution.
Reply
#5
Not Solved
Any help on this!!!!
Reply
#6
Not Solved
Hi ,

Hope JavaTable record mode in "Advanced Java Options" dialog box (Tools > Options > Java tab > Advanced button) is set to "Context-Sensitive".

Could you paste the code generated if record an operation of selecting a column in JavaTable.
Reply
#7
Not Solved
Hi Arjun,

I had a similar problem a while ago. QTP couldn't recognize objects (combo boxes) in JavaTable cells. I solve it with using keyboard to select combo value.
Try something like:



Code:
JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").ClickCell i, 1

JavaWindow("EclipseEJ").Type  micReturn
JavaWindow("EclipseEJ").Type "1"
JavaWindow("EclipseEJ").Type  micReturn

You can record keyboard input using low level recording.

Hope this helps or at least gives you some ideas...
Reply
#8
Not Solved
I am facing same issue in QTP 11.0 with Java Jide (swing) application , its not clicking the particular cell in javatable.
Code:
JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").ClickCell i, 1
JavaWindow("EclipseEJ").JavaDialog("Online Credit Agreement").JavaTable("Select products:").DoubleClickCell i, 1

What could be reason for this?????
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Access to JavaCombobox in JavaTable cell? jarkkop 2 3,755 10-17-2018, 09:32 PM
Last Post: riyaz
  Set Value in JavaEdit Inside JavaTable yonobev 9 12,999 11-08-2017, 11:12 PM
Last Post: lotos
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,317 07-10-2017, 04:20 PM
Last Post: rajeevk7
  Working on javatable reddyraam10 0 1,771 02-07-2017, 08:12 AM
Last Post: reddyraam10
  QTP not selecting appropriate webelement from the webtable..Need Solution satishkumarm 11 21,639 03-23-2016, 12:47 PM
Last Post: Swetha_Bayya

Forum Jump:


Users browsing this thread: 1 Guest(s)