Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP AOM related Question - need solution
#5
Solved: 11 Years, 2 Months ago
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:
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.


Attached Files
.doc   Env_XML.doc (Size: 57 KB / Downloads: 82)
Reply


Messages In This Thread
RE: QTP AOM related Question - need solution - by prodipto_dutta - 05-03-2011, 03:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Scrambled characters in uft Solution Explorer Dwarak Calayampundi 0 1,504 05-25-2016, 05:02 AM
Last Post: Dwarak Calayampundi
  QTP not selecting appropriate webelement from the webtable..Need Solution satishkumarm 11 21,493 03-23-2016, 12:47 PM
Last Post: Swetha_Bayya
  QTP system related issue Bharathi Kanagarajan 1 2,061 09-12-2015, 11:28 PM
Last Post: ADITI1992
  AOM script is running only one or two scripts. jramya 4 4,076 07-24-2014, 06:15 PM
Last Post: jramya
  Issue related to dropdown selection(Please help urgent) excellentpawan123 2 4,156 05-31-2014, 12:00 PM
Last Post: excellentpawan123

Forum Jump:


Users browsing this thread: 2 Guest(s)