Hello
Can anybody please spacify how can i solve attached pop up i am able to solve simple pop up
one Interesting problem is that when i record the script the script is not generated and after recording while i m running the script i have found this issue.
Your code should look like this, this is not the complete code but main you should look is how i cam saving a CSV File that is what you screen shot shows...
Code:
If Browser("Browser").Exist(3) Then
If Browser("Browser").WinButton("To help protect your security,").Exist(3) Then
Browser("Browser").WinButton("To help protect your security,").Click 1,1,micRightBtn
Browser("Browser").WinMenu("menuobjtype:=3").Select "Download File..."
Browser("Browser").Sync
End If
If Browser("Browser").Dialog("File Download").WinButton("Save").Exist(10) Then
Browser("Browser").Dialog("File Download").Activate
Browser("Browser").Dialog("File Download").WinButton("Save").Click
If Browser("Browser").Dialog("File Download").WinButton("Save").Exist(5) Then
Browser("Browser").Dialog("File Download").WinButton("Save").Click
End If
If Dialog("File Download").Dialog("Save As").WinEdit("File name:").Exist(10) Then
Set CurrentTest = QCUtil.CurrentTest
Dim sFolderName
sFolderName = CurrentTest.Name
sFileLoc = ResultScreenShotLocationPath_write & sFolderName & "\" & MakeUniqueName & ".csv"
Set fso = CreateObject("Scripting.FileSystemObject")
If not fso.FolderExists (ResultScreenShotLocationPath_write&sFolderName) Then
fso.CreateFolder( ResultScreenShotLocationPath_write&sFolderName )
End If
Dialog("File Download").Dialog("Save As").WinEdit("File name:").Set sFileLoc
Reporter.ReportEvent micPass, "CSV File", "File has been saved at locaiton "&sFileLoc
wait(3)
Dialog("File Download").Dialog("Save As").WinButton("Save").Click
If Dialog("File Download").Dialog("Save As").Dialog("Save As").WinButton("Yes").Exist(3) Then
Dialog("File Download").Dialog("Save As").Dialog("Save As").WinButton("Yes").Click
End If
If Browser("Browser").Exist(3) Then
Browser("Browser").Close
End If
Parameter("OutputCSVFileName_OUT") = sFileLoc
End If
Else
Hello Surya,
Thanks for Guide me. but i have found one strang problem here because when i recorded the script this dialogbox was not exists at that place, there is no any code like in your reply generated but while i am running that test case popup exists and QTP stop working and generate an Error message. i have recorded script 2 to 3 times but i haven't found that dialog box.
so my Question is :"
1) Can i recorded that part at run time ?
while i am recording that pop up run time or add in add in object repository it still displayed an error.