Support Team wrote:Hello Voughan,
May I ask if you could explain your question in more detail, maybe based on another sample? Why is it necessary for you to convert the XPath expression into a RxPath instead of generating the RxPath directly?
I'm attempting to create resilient automation to test our integration with Oracle Fusion. The DOM is particularly complected and ugly and we know from previous experience (using QTP) that attributes like ID, class, etc, will change as patches are applied and versions updated.
The RxPath straight from the spy is
Code: Select all
While I realize I can adjust how RxSpy identifies and evaluates attributes, as you'll see below there doesn't appear to be a good way to get RxSpy to provide me a resilient RxPath.
For 90% of what I'm doing regular expressions are working pretty well. However in this particular case I've got over a dozen "Begin" buttons. Four are visible in the attached image, but there are also 4 other sets with various number of "Begin" buttons.
Furthermore, these scenarios are data-driven
and the button ID is NOT
consistent between users and sessions. The Xpath I proposed allows me to define a row by its contents, in this case containing "Performance Review" and a "Begin" button. Once my row element is identified I can just grab the first and only "Begin" button that's there.
In other similar situations I've been able to use child/descendant elements that were easier to identify and tracked back to the parent/ancestor element that I desired. In this case there are so many div and table objects between identifiable elements that this method become less resilient.
The Xpath of this object according to FirePath is this:
Code: Select all
I've approached our dev team to see if there was a way to insert our own attributes to these elements, but that is simply not possible.
And the extra wrinkle in this situation is that I'm developing automation that will be supported and used by less technical QA folks. My goal is to do this all without creating any custom user code, and so far I've managed to stick to that requirement.