Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP resets values of certain fields, while running (Code attached)
#1
Not Solved
I am facing a strange problem with the QTP scripts.
The script populates certain text box fields in a page. However while running, it writes those values in the textbox and then deletes it , before moving to the next step. Thus the script fails.
Also this happens on specific systems only. It works fine on one system.
I am running these scripts from QC9.2. The QTP version is 9.5

The function is as follows :

Code:
Public Function EditField(ApplName, FieldName, Indeks, FieldDesc, FieldValue)
   Dim TextToFind
   Dim EditFelt
   Dim Knappen
   Dim MyApplication
  
If FieldValue <> IGNORE_TXT Then
    Set MyApplication = Description.Create()            
    MyApplication("text").value = ApplName & "*.*"
    
    Set EditFelt = Description.Create()
    EditFelt("swfname").Value = FieldName
    EditFelt("index").Value =  Indeks

    SwfWindow(MyApplication).Activate

if SwfWindow(MyApplication).SwfEdit(EditFelt).exist(0) then


    SwfWindow(MyApplication).SwfEdit(EditFelt).Set FieldValue
    SwfWindow(MyApplication).Type micTab

TextToFind = SwfWindow(MyApplication).SwfEdit(EditFelt).GetROProperty("text")
     EditField =TextToFind

else
Call ReportBitmap( Null, micFail,  "Editfield : " & FieldDesc & " was not found")
end if

end if

End Function


The EditField 'Editfelt' is set to FieldValue, as mentioned in the script. But just after populating this field, the script resets it again to the default value or blank and then moves on to the next step.

Any ideas??
Reply
#2
Not Solved
Hello,

I am facing a similar problem but mine is a web application, on button click all the information entered is getting reset to blank.
Can you please help if you find any solution for this?

Thanks,
Anshika
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Running QTP scripts without QC sowjanya 3 6,105 07-16-2015, 11:16 AM
Last Post: ravi.gajul
  QTP enters value but on button click it resets to blank or 0 anshika.agarwal 3 2,939 02-23-2015, 08:34 PM
Last Post: anshika.agarwal
  QTP does not stop running furqanmlk 2 3,901 08-25-2013, 02:06 PM
Last Post: GregHicks
Exclamation Screenshots are not getting attached to wordfile TechiGizmo 0 1,805 01-04-2013, 03:57 AM
Last Post: TechiGizmo
  QTP with EMMA Code Coverage Tool Sdhar 2 4,541 09-23-2011, 05:59 AM
Last Post: Sdhar

Forum Jump:


Users browsing this thread: 2 Guest(s)