Micro Focus QTP (UFT) Forums
Where can I get statements for changing qtp settings. - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Where can I get statements for changing qtp settings. (/Thread-Where-can-I-get-statements-for-changing-qtp-settings)



Where can I get statements for changing qtp settings. - anil2u - 01-05-2012

Hi

I read thru lot of blogs about changing qtp settings within the script (say like Setting("DisableReplayUsingAlgorithm") = 0 ). Please forgive my ignorace Sad but where exactly I can find all the info. about this stuff. i.e. controlling qtp settings within the script using statements as above.

Appreciating ur help

Thanks
Anil


RE: Where can I get statements for changing qtp settings. - sshukla12 - 01-05-2012

Hi,
u can refer this code it might help u.

Code:
Sub loadTestSettings(byRef App, byVal strENV)
   If getRunMode() = "DEBUG" Then
              ' setting en mode DEBUG
        App.Test.Settings.Run.OnError = "Dialog"
    Else
     ' setting en mode Run
        App.Test.Settings.Launchers("Web").Active = False
        App.Test.Settings.Launchers("Web").Browser = "IE"
        App.Test.Settings.Launchers("Web").CloseOnExit = False
        App.Test.Settings.Launchers("Windows Applications").Active = False
        App.Test.Settings.Launchers("Windows Applications").Applications.RemoveAll
        App.Test.Settings.Launchers("Windows Applications").RecordOnQTDescendants = True
        App.Test.Settings.Launchers("Windows Applications").RecordOnExplorerDescendants = True
        App.Test.Settings.Launchers("Windows Applications").RecordOnSpecifiedApplications = True
        App.Test.Settings.Run.IterationMode = "rngAll"
        App.Test.Settings.Run.StartIteration = 1
        App.Test.Settings.Run.EndIteration = 1
        App.Test.Settings.Run.ObjectSyncTimeOut = 20000
        App.Test.Settings.Run.DisableSmartIdentification = True
        App.Test.Settings.Run.OnError = "Stop"
        'App.Test.Settings.Run.OnError = "Dialog"
        App.Test.Settings.Resources.DataTablePath = "<Default>"
        App.Test.Settings.Web.BrowserNavigationTimeout = 10000
        App.Test.Settings.Web.ActiveScreenAccess.UserName = ""
        App.Test.Settings.Web.ActiveScreenAccess.Password = ""
        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        ' System Local Monitoring settings
        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        'App.Test.Settings.LocalSystemMonitor.Enable = false
    End If
End Sub

Regards,
Sankalp


RE: Where can I get statements for changing qtp settings. - ravi.gajul - 01-05-2012

For more information as to how to generate the above steps you may look at the object model diagram.
For this,
Go to QTP help file--->QuicktestAdvanced References---->Quick test automation---->Object model diagram.


RE: Where can I get statements for changing qtp settings. - anil2u - 05-18-2012

Hi Ravi & Sankalp,

Thank you both guys, very late though Smile I did find the Object model diagram really useful in coding all that I required.

Cheers
Anil


RE: Where can I get statements for changing qtp settings. - ravi.gajul - 05-21-2012

Glad it helped you.