Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem to set a data into a JavaEdit field
#1
Not Solved
Hi,
I am using QTP 10.0 + AddIn to simulate a java application.

To set a data into a javaedit field, I am using the following method.
Sometimes it works, sometimes not, and this with the same data and the same context.



Code:
if (object.WaitProperty ("enabled", "1", 10000) and object.WaitProperty ("visible", "1", 10000)) then
                object.click 0, 0
                If (object.WaitProperty("focused",True, 10000) = false) then
                               object.click 0, 0
                               object.setfocus
                end if
                object.WaitProperty "editable",True, 10000
                object.set arrKeyIndex(1)
                object.Type micReturn
else
                Err.raise(err_field_not_available )
                Reporter.ReportEvent micFail,"Error # " & CStr(Err.Number), "Field not available"
end if

How can I improve this code to be sure that the set will be done.

Thanks for your help.
Reply


Messages In This Thread
Problem to set a data into a JavaEdit field - by bwillems - 11-30-2010, 07:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Clicking on Window object to make it a javaedit object indranilgoswamimcb 0 2,066 11-03-2013, 09:03 PM
Last Post: indranilgoswamimcb
  QTP recognizing every JavaEdit as "VTextField" having different index values. K Gaurav Varshney 1 2,220 10-29-2012, 11:51 AM
Last Post: krr
  problem with retieving the data from the webtable vijay44 2 2,994 05-25-2010, 12:43 PM
Last Post: jojiraj
  set data from excel file in vbs devanggoel 2 2,811 03-08-2010, 06:31 PM
Last Post: Saket
  problem with retieving the data from the datatable vijay44 3 2,609 01-26-2010, 12:23 AM
Last Post: sreekanth chilam

Forum Jump:


Users browsing this thread: 1 Guest(s)