Micro Focus QTP (UFT) Forums
Pop up issue need Solution: its urgent - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Pop up issue need Solution: its urgent (/Thread-Pop-up-issue-need-Solution-its-urgent)



Pop up issue need Solution: its urgent - chetan-24 - 12-05-2008

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.

Could anybody please take a look.

Thanks
Chetan


RE: Pop up issue need Solution: its urgent - surya_7mar - 12-09-2008

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



RE: Pop up issue need Solution: its urgent - chetan-24 - 12-10-2008

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.


RE: Pop up issue need Solution: its urgent - surya_7mar - 12-11-2008

what is the pop-up that you getting, i think it was Already Exists dialog box rgiht.
Then you can record that too and chage the code accordinglyt


RE: Pop up issue need Solution: its urgent - chetan-24 - 01-15-2009

Thanks a lot its work.

thanks
Chetann!