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
#2
Not Solved
Using the options “Use Java API” , “Send InputMethod event”, “Send FOCUS_LOST event at end”

=> This does not help

Using the option “Perform mouse/keyboard operations at device level for these selected methods:”

=> This does not help

Using the internal method of the JavaEdit instead of QTP ones

=> This does not help

Using the FireEvent method

=> This does not help

Increasing the Object Synchronisation Timeout

=> Looks like to have a good impact

Now I check the RefreshObject method
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)