mmadaan
13 years agoOccasional Contributor
Elemenation of DOM approach
Hi,
This is Mohit from Financial Engines and we are using test complete from last 2 years but we ran into 1 major problem while using it.
The problem is:
For verifying the UI elements we are using the DOM approach example:
If (w1.Panel("page").Panel("page_body").Panel("page_body_content").Panel("pnlGoals_panel").Panel(1).Panel(0).innerHTML <> "Goals") Then
TCstatus = "FAIL"
Else
TCstatus = "PASS"
End If
testCaseId = "UI 1.3.3 - Goals is Displayed"
Call Commons.doLogTestCaseStatus(testCaseId, TCstatus)
But if some panel changes in between, our automation is going to fail and it takes lot of effort to rectify that.
We are already using the NATIVEWEBOBJECT function for functional automation but it will not solve the problem for UI automation as we need to verify the positions and path as well for UI verification.
We explored a bit and came up with a new approach to handle this. Example:
Now there are few queries regarding this:
Query1:
-----------------
Is there any other best approach to avoid DOM and use some other approach that validates the UI test cases (Example of the UI test case: Logo should be present in upper left corner of the web page)
Query2:
------------------
As per the new approach shown above:
Can we define the Base panel at global level or across the project through property files or project varibales so that we need to add the base panels in each and every script.
Thanks and Regards
Mohit
mmadaan@financialengines.com
This is Mohit from Financial Engines and we are using test complete from last 2 years but we ran into 1 major problem while using it.
The problem is:
For verifying the UI elements we are using the DOM approach example:
If (w1.Panel("page").Panel("page_body").Panel("page_body_content").Panel("pnlGoals_panel").Panel(1).Panel(0).innerHTML <> "Goals") Then
TCstatus = "FAIL"
Else
TCstatus = "PASS"
End If
testCaseId = "UI 1.3.3 - Goals is Displayed"
Call Commons.doLogTestCaseStatus(testCaseId, TCstatus)
But if some panel changes in between, our automation is going to fail and it takes lot of effort to rectify that.
We are already using the NATIVEWEBOBJECT function for functional automation but it will not solve the problem for UI automation as we need to verify the positions and path as well for UI verification.
We explored a bit and came up with a new approach to handle this. Example:
arrObjProperty = Array("ObjectType","FullName")
arrObjPropValue = Array("Panel","*Panel(""pnlOtherIncome_panel"").Panel(1).Panel(0)")
Set objectRef = pnlBasePanel.FindChild(arrObjProperty,arrObjPropValue,20000,True)
Ref_DOMChangeLibrary.fnVerifyProperty "UI 2.5 - Goals is Displayed",objectRef.innerHTML,cmpEqual,"Other retirement income",False
where pnlBasePanel is Aliases.IE.Page(“*”).Page(“page”).Page(“page_body”).Page(“page_body_content”)
Now there are few queries regarding this:
Query1:
-----------------
Is there any other best approach to avoid DOM and use some other approach that validates the UI test cases (Example of the UI test case: Logo should be present in upper left corner of the web page)
Query2:
------------------
As per the new approach shown above:
Can we define the Base panel at global level or across the project through property files or project varibales so that we need to add the base panels in each and every script.
Thanks and Regards
Mohit
mmadaan@financialengines.com