I've been working with UFT for a couple of weeks now and I'm trying to automate some testing for a Web Application.
I'm using descriptive programming to manipulate the website and I'm doing a very small amount of custom logging to modify the end report.
For some reason I can't figure out, I occasionally get an end report that has about a thousand of meaningless "WebElement.Exist" statements.
[img]file:///C:/Users/b003223/Desktop/Untitled.png[/img]
In all of my code I am grabbing elements through descriptive programming without an object repository via something similar to:
I never turn off the original reporter but I do make a couple of additional checks for every test. Here is the function I use to report:
As I write this I find it fishy that my first line of code above is very similar to my issue but that specific line of code runs only once (and in a different test) than where these WebElement statements are trampling me.
Here is the entirety of my test I'm running
Any ideas?
Untitled.png (Size: 15.29 KB / Downloads: 1)
I'm using descriptive programming to manipulate the website and I'm doing a very small amount of custom logging to modify the end report.
For some reason I can't figure out, I occasionally get an end report that has about a thousand of meaningless "WebElement.Exist" statements.
[img]file:///C:/Users/b003223/Desktop/Untitled.png[/img]
In all of my code I am grabbing elements through descriptive programming without an object repository via something similar to:
Code:
checkWebElement = Browser("creationtime:=.*").Page("title:=.*").WebElement("innerhtml:=" & inner_html).ExistI never turn off the original reporter but I do make a couple of additional checks for every test. Here is the function I use to report:
Code:
Sub assertAreEqual(value1,value2,action)
Dim compare
compare = StrComp(value1,value2,vbTextCompare)
If(compare = 0) Then
Reporter.ReportEvent micPass,action, "Arg 1: " & value1 & vbCr & "Arg 2: " & value2
Else
Reporter.ReportEvent micFail,action, "Arg 1: " & value1 & vbCr & "Arg 2: " & value2
End If
End SubAs I write this I find it fishy that my first line of code above is very similar to my issue but that specific line of code runs only once (and in a different test) than where these WebElement statements are trampling me.
Here is the entirety of my test I'm running
Code:
search_param1 = DataTable("parameter_1",dtGlboalSheet) 'grabs input paramter
openWebApp() 'Nothing more than opening IE with a specific URL
navigateToSearchScreen() 'Goes through a couple of websites to arrive on search page
call populateBox("txtSearchId", search_param1) 'Fills box with search_parameter value
submit() 'clicks submit button
result1 = getPropertyValueFromResults("1","Id") 'Grabs end value shown on screen
call assertAreEqual(search_param1,result1,search_by1 & " Check") 'Compares end value with input parameter
closeWebApp(0) 'Closes browserAny ideas?
Untitled.png (Size: 15.29 KB / Downloads: 1)