Page 1 of 1

Microsoft Report Viewer and WebElement ID

Posted: Wed Jan 23, 2013 4:57 pm
by hporter
Hi, I am trying to run Ranorex against our product, which runs a report (in a browser) that outputs its results via Microsoft Report Viewer. I have set Ranorex to validate a particular element within the report results (a username). The problem is, with every run of the report, there is a new WebElement ID being assigned to that element within the report. The end result is the validation fails every time. Does anyone have any tips on how to work around this issue? Any advice would be appreciated, thanks!

Re: Microsoft Report Viewer and WebElement ID

Posted: Wed Jan 23, 2013 6:44 pm
by Ciege
Sounds like there is not a persistent unique identifier for the element, so the WebElement ID gets assigned at runtime, which would be different for each and every execution of the test.

1) Is there another persistent, unique identifier you can use (other than WebElement ID)?
2) Is there a unique pattern to the element you want to find? If so, you can try using a RegEx expression to search for it.
3) Are there any persistent text patterns surrounding the element you want to find? If so, you can search for those and find your element.
4) If none of the above... Can you post a RanorexSpy snapshot of the MS Report viewer with your data in it (and tell us what the current WebElement ID is) so we can have a look and provide more suggestions.