issue with specifying environment file at run-time
I am specifying the settigns like associated vbs files, datafiles etc at run time instead of
design time. Everything works fine but I am facing the challenege with the environment file.
Here is my sample code for that , please advise (I tried using xml file instead of txt too, didnt worked)
Dim App 'As Application
Set App = CreateObject("QuickTest.Application")
App.Visible = True
App.Open "C:\Scripts\Login Test", True ' Open the test in read-only mode
App.Test.Settings.Resources.DataTablePath = "C:\Data_Tables\ST_Regression.xls"
'App.Test.Environment.LoadFromFile("C:\ePMA\Enviro nment\ST.txt")' is not getting changed to whatever file I specify , QTP picks
the one from the design time setting. I tried removing the file from design time setting in that case too it doesn't pick up
the one specified here.
Re: issue with specifying environment file at run-
Don't do this bunch of codes.
Do this only inside of TC in the place, you need to get value from Environmental file (doesn't matter: .xml or .txt or .INI:
someVariable = Environment.Value("StringKeyNameYouNeedValueFrom")
Be sure, your Environmental file is created correctly. (see Help)