Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Report Viewer showing hundreds of WebElement.Exists?
#1
Not Solved
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:
Code:
checkWebElement = Browser("creationtime:=.*").Page("title:=.*").WebElement("innerhtml:=" & inner_html).Exist

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:

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 Sub



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
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 browser


Any ideas?


Attached Files Image(s)
   
Reply
#2
Not Solved
Use abs_x or abs_y to differentiate the WebElements of the Web Application
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation WebElement("WebElement").Click is not working sia sharma 7 23,953 09-28-2016, 08:58 PM
Last Post: supputuri
  How to Export run result viewer with CAPTURED DATA and save it in PDF,or Doc,or HTML akhandesh 0 2,950 07-16-2015, 06:03 PM
Last Post: akhandesh
  How to capture objects of Event Viewer ? Vishnu Narayan 1 2,584 06-11-2015, 06:29 PM
Last Post: venkatesh9032
  How to check whether data exists in excel.. venkatesh9032 1 3,070 03-06-2014, 04:37 PM
Last Post: supputuri
  QTP 11.0 Doesn't allow to save excel extracted from BO report. Hema Ganesh.M 1 3,226 12-09-2013, 07:32 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)