| || |
Hidden Objects when run on Virtual Machine
Our team are currently baffled by an issue that occurs on a specific page, of our web application, but only occurs on virtual machines.
The issue is this.
We have a function that we run on every page/component, which scans for the descriptive properties of our websites own error message/report. eg - it has a specific class, and we look for it, and always give it an index of 0 to locate the first occurance.
The point is, that if we are not expecting an error, and there is a 'first' error message, then the test has failed, because the application threw an error.
However, on virtual machines, on a specific page of the application, QTP is identifying 3 objects which apparently match the properties of our error class.
Our function attempts to get the error text for the class, and then print it out into our logs, however, because the phantom object, is not actually an error message at all, it errors out on the GetROProperty call - getting the text of an object that has no text apparently causes this failure.
Our team has been taking turns debugging it, trying to locate the issue.
But have encountered some strange results
When setting a variable to the DOM object for the phantom object, the watch does indeed populate with <object> - we have the object.
When we try to get a sub object/element from that object, that sub object gets a value in the watch as
<parent object> required.
set PhantomObject = Browser().Page().Frame().WebElement().Object
' At this point, PhantomObject is populated
set AllObject = PhantomObject.all
'This line of code, errors out, and says that PhantomObject is required.
It seems that getting the RO Property for any of the objects apparent objects also returns an error.
Here is some code
On error resume next
If Browser("title:=.*AppTitle.*").Page("title:=.*AppT itle.*").Frame("name:=frameName").WebElement("inde x:=0","class:=errorclass").Exist then
arry = Browser("title:=.*AppTitle.*").Page("title:=.*AppT itle.*").Frame("name:=frameName").WebElement("inde x:=0","class:=errorclass").GetROProperty("visible" )
'MsgBox ("Error # " & CStr(Err.Number) & " " & Err.Description)
Browser("title:=.*AppTitle.*").Page("title:=.*AppT itle.*").Frame("name:=frameName").WebElement("inde x:=0","class:=errorclass").highlight
The result of DescribeResult, is a rather un-descriptive 'Unspecified Error'
Once again - the odd thing is, that this ONLY occurs on virtual machines,
When the same page, in the same application is viewed, and has this code run on a physical machine, the object Does not exist, and thus causes no problems.
Have also tried
CaptureBitmap on the object, to locate it - returned an error
GetROProperty("x") = returned an error
The only thing I have managed to get, was the GetTOProperty("parent") - and that was kinda useless, because it just returned the frame.
Note - we have viewed the html source of the page, and there is NO objects that match the class type we are looking for.