05-03-2011, 03:33 PM
Thanks for your reply . point no 2 what you said its perfectly working.
in case of point no 3, Please find the sample script below:
Now I added environment xml file dynamically.
Just to check whether its added or not I put one msgbox inside qtp script
like :
Now I didnt get any value for this msgbox but not getting any error also.
I dont know why ...
But if i added through test setting then i got the value.
for your understanding also attached one doc file that provides a snapshot that msg box does not display actual value.
I will try .ini what you have said earlier but I just wanted know why this is not working ?
Thanks for your effort and help.
in case of point no 3, Please find the sample script below:
Code:
[b]EnvXMLfile = "C:\ncs-stream-test\istarncsqtp\tests\common\properties.xml"[/b]
libraryfile = "C:\istar-gv-MUN\istar-gv\munqtp\tests\lib\commonLibraryFunctions.vbs"
Set qtp_App = CreateObject("QuickTest.Application")
qtp_App.launch
qtp_App.Visible = True
'Object.Open TestPath,OpenInReadOnlyMode,SaveCurrent
qtp_App.Open "C:\sampletest",false,false
[b]qtp_App.Test.Environment.LoadFromFile(EnvXMLfile)[/b]
qtp_App.Test.Settings.Resources.Libraries.RemoveAll
qtp_App.Test.Settings.Resources.Libraries.Add(libraryfile)
' find out number of actions in a perticular test
For i=1 To qtp_App.Test.Actions.Count
qtp_App.Test.Actions(i).ObjectRepositories.RemoveAll
qtp_App.Test.Actions(i).ObjectRepositories.Add "C:\Shared OR.tsr"
Next
qtp_App.Test.Run
Now I added environment xml file dynamically.
Just to check whether its added or not I put one msgbox inside qtp script
like :
Code:
[b]val = Environment.Value("xenosUrl")
msgbox val[/b]
browser("ISTAR GV").Page("ISTAR GV").WebEdit("j_username").Set "istar"
browser("ISTAR GV").Page("ISTAR GV").WebEdit("j_password").Set "istar"
browser("ISTAR GV").Page("ISTAR GV").Link("Login").Click
Now I didnt get any value for this msgbox but not getting any error also.
I dont know why ...
But if i added through test setting then i got the value.
for your understanding also attached one doc file that provides a snapshot that msg box does not display actual value.
I will try .ini what you have said earlier but I just wanted know why this is not working ?
Thanks for your effort and help.