Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you clear default values of java edit box contained within a java table?
#1
Not Solved Sad 
Hi,

I am currently using QuickTest v9.5 and have created scripts for a Java applet application. In the application, I am attempting to clear the default value ('0.00') of a java edit box that is contained within a java table. I can type a new value into the java edit box, but the new
value is typed at the end of the default value which is not what I wanted. The java edit box is only activated after a click, hence it is not captured during record/playback.
I am accessing the edit box via the row no and column no's of the java table.

CODE SNIPPET
Line# 1:
Code:
Browser(DataTable.Value("envlbl", dtGlobalSheet)).Page(DataTable.Value("envlbl", dtGlobalSheet)).ActiveX("Java
Plug-in").JavaApplet("ICFMApplet").JavaDialog("Timeseries data").JavaTable("Select data entry method:_Vol").ActivateRow "#0"

Line# 2:
Code:
Browser(DataTable.Value("envlbl", dtGlobalSheet)).Page(DataTable.Value("envlbl", dtGlobalSheet)).ActiveX("Java
Plug-in").JavaApplet("ICFMApplet").JavaDialog("Timeseries data").JavaTable("Select data entry method:_Vol").ClickCell 0,3

Line# 3 :
Code:
Browser(DataTable.Value("envlbl", dtGlobalSheet)).Page(DataTable.Value("envlbl", dtGlobalSheet)).ActiveX("Java
Plug-in").JavaApplet("ICFMApplet").JavaDialog("Timeseries data").JavaTable("Select data entry method:_Vol").Type  "123"

Line# 4:
Code:
Browser(DataTable.Value("envlbl", dtGlobalSheet)).Page(DataTable.Value("envlbl", dtGlobalSheet)).ActiveX("Java
Plug-in").JavaApplet("ICFMApplet").JavaDialog("Timeseries data").JavaTable("Select data entry method:_Vol").Type micReturn


SOLUTIONS I HAVE ATTEMPTED IN TRYING TO CLEAR DEFAULT VALUES
Solution #1: SetCellData
Result: Unspecified Error
Solution #2: Type micBack three times before line # 3
Result: nothing happens
Solution #3: Defined the edit box object in the Object Repository and attempted to activate the edit box
Result: Run error, cannot identify the object
Solution #4: PressKey "X", micCtrl before line # 3
Result: nothing happens
Solution #5: Adding SelectCell after click cell
Result: Operation cannot be performed

Would very much appreciated any other suggested solutions that I can try.

THANK YOU!
Reply
#2
Not Solved
Hi,

Just try to put blank in the edit box before u type ur desiderd value.
exmpl:
Line# 3 :
Code:
Browser(DataTable.Value("envlbl", dtGlobalSheet)).Page(DataTable.Value("envlbl", dtGlobalSheet)).ActiveX("Java
Plug-in").JavaApplet("ICFMApplet").JavaDialog("Timeseries data").JavaTable("Select data entry method:_Vol").Type  ""

or

Line# 3 :
Code:
Browser(DataTable.Value("envlbl", dtGlobalSheet)).Page(DataTable.Value("envlbl", dtGlobalSheet)).ActiveX("Java
Plug-in").JavaApplet("ICFMApplet").JavaDialog("Timeseries data").JavaTable("Select data entry method:_Vol").set ""

Then

Line# 3 :
Code:
Browser(DataTable.Value("envlbl", dtGlobalSheet)).Page(DataTable.Value("envlbl", dtGlobalSheet)).ActiveX("Java
Plug-in").JavaApplet("ICFMApplet").JavaDialog("Timeseries data").JavaTable("Select data entry method:_Vol").Type  "123"

Let me know whether this is working or not

Regards
Raj
Reply
#3
Not Solved
Hi Raj

Thank you for your suggestions, I tried them both:

Type ""
Result: nothing seems to happen because the resulted value was still "0.0123"

Set ""
Result: QTP complained 'Operation cannot be performed'

Other things I tried:
1) Type micShiftHome & "123" &micReturn
Result: 0.0123

2) Type micShiftDwn & micHome & micShiftUp & micDel + "1" & micReturn
Result: The cursor went to the very last column of the table row.
But this key combination is what was generated by QTP during low-level recording.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Java objects not refreshed bonnaudc 2 2,004 03-08-2017, 11:50 AM
Last Post: prajyot
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,713 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  How to edit a text in aParagraph shaan.mishra87@gmail.com 2 2,542 08-26-2016, 04:48 PM
Last Post: shaan.mishra87@gmail.com
  webfile web object not identified at runtime in a java application saila123 1 2,821 02-11-2015, 08:23 PM
Last Post: Kirill
  Auto complete for Web Edit box branjitk 2 5,918 12-20-2014, 09:31 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 2 Guest(s)