Forum Discussion
aduddella
14 years agoContributor
Dear Allen
Thank you for the suggestion
My problem is when i try to use test complete find method i can get the frame object but what i need is the DOM document object by which I can search for objects using native dom methods
So following your suggestion I am getting a dom document with the following code but this does not have any of the innerhtml code
Sys.Process("iexplore", 2).Refresh
Set Page = Sys.Process("iexplore",2)
' Search for the child objects of the browser Process
PageObj = Page.FindAllChildren("Name",PgName,60)
If UBound(PageObj) <> -1 Then
If IsObject(PageObj(UBound(PageObj))) Then
If InStr(LCase(PageObj(UBound(PageObj)).URL),LCase("https://crmtest.xlntelecom.co.uk/cust_acct_frame.asp")) > 0 THEN
aqUtils.Delay 2000
Set frameObject = PageObj(UBound(PageObj)).find("name","frame(*)",10)(0)
Set Obj = frameObject.document
If (Not PageObj(UBound(PageObj)).Exists) Then
Log.Error("The Page(" & pageURL & ") object was not found.")
Set GetPageObject=Nothing
Else
Set GetPageObject=Obj
End If
Set Obj = frameObject.document
This command give me the access to dom document object but it does not have any child nodes in it
I have attached the html page source for your view and the document objects which i want to access are dynamic which get loaded in a frame but some times i get an access and most of the times it always throws an error saying access denied whereas i can see that the page is already loaded
earlier I was using SYS.PROCESS(IEXPLORE).PAGEOBJECT.ZDOCUMENT.FRAME("NAME").DOCUMENT
But this does not work always .
Any more suggestion would be greatly appreciated
Regards
Anand
Thank you for the suggestion
My problem is when i try to use test complete find method i can get the frame object but what i need is the DOM document object by which I can search for objects using native dom methods
So following your suggestion I am getting a dom document with the following code but this does not have any of the innerhtml code
Sys.Process("iexplore", 2).Refresh
Set Page = Sys.Process("iexplore",2)
' Search for the child objects of the browser Process
PageObj = Page.FindAllChildren("Name",PgName,60)
If UBound(PageObj) <> -1 Then
If IsObject(PageObj(UBound(PageObj))) Then
If InStr(LCase(PageObj(UBound(PageObj)).URL),LCase("https://crmtest.xlntelecom.co.uk/cust_acct_frame.asp")) > 0 THEN
aqUtils.Delay 2000
Set frameObject = PageObj(UBound(PageObj)).find("name","frame(*)",10)(0)
Set Obj = frameObject.document
If (Not PageObj(UBound(PageObj)).Exists) Then
Log.Error("The Page(" & pageURL & ") object was not found.")
Set GetPageObject=Nothing
Else
Set GetPageObject=Obj
End If
Set Obj = frameObject.document
This command give me the access to dom document object but it does not have any child nodes in it
I have attached the html page source for your view and the document objects which i want to access are dynamic which get loaded in a frame but some times i get an access and most of the times it always throws an error saying access denied whereas i can see that the page is already loaded
earlier I was using SYS.PROCESS(IEXPLORE).PAGEOBJECT.ZDOCUMENT.FRAME("NAME").DOCUMENT
But this does not work always .
Any more suggestion would be greatly appreciated
Regards
Anand
Related Content
Recent Discussions
- 4 hours agosimonaferrara
- 13 hours agoSubhraDas
- 2 days agotramuntana