Same test case different envirnment
Same test case different envirnment
Hey there. I am working on project with your product and I got some difficulties. The main thing is our product can be lunched through browser or through desktop one app but its kinda same because it lunch it as page just in other environment. The thing is if I write one test case fro browser lets say FF and i want it to use for the desktop app we get problem with base-adapter in paths. ALL path are identical only adapter different. Is possible to use the same test case in both with some kinda parameters or something ? I guess in code modules it might be possible but then you would not really use any repositories and it would be bad practice. ANY suggestion? its kinda code duplication with slight different so tho i would ask about it... Thanks for respons
Re: Same test case different envirnment
Hi,
Could you please post a Ranorex snapshot (not screenshot) taken both in browser and desktop mode? It may be possible that your problem is solvable by a simple xpath change in repository. But it's pretty hard to suggest something reliable without seeing at least the Ranorex snapshot and an example of problematic xpath. Thanks.
Could you please post a Ranorex snapshot (not screenshot) taken both in browser and desktop mode? It may be possible that your problem is solvable by a simple xpath change in repository. But it's pretty hard to suggest something reliable without seeing at least the Ranorex snapshot and an example of problematic xpath. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Same test case different envirnment
Hello Romarijo,
You could add an additional /(slash) in front of the DOM object. I have tested it on the Google search windows that I have opened in Firefox and later in Eclipse. The full path to the Google search window is minimally changed and now works in Firefox and in Eclipse despite the fact that Eclipse has some layers before you even get to the built-in browser.
The path before: /dom[@caption='Google']//input[#'lst-ib']
The path after: //dom[@caption='Google']//input[#'lst-ib']
However, there is a catch. Because of the double slash Ranorex will search the whole tree of the host for the dom. Meaning, all open applications. This could have a performance impact.
For more info please see: http://www.ranorex.com/support/user-gui ... xpath.html
Another possibility would be to record two repositories, one for the browser and one for the desktop app. This would not impact your performance but it is more work for you.
Please let me know if this helped.
Regards,
McTurtle
You could add an additional /(slash) in front of the DOM object. I have tested it on the Google search windows that I have opened in Firefox and later in Eclipse. The full path to the Google search window is minimally changed and now works in Firefox and in Eclipse despite the fact that Eclipse has some layers before you even get to the built-in browser.
The path before: /dom[@caption='Google']//input[#'lst-ib']
The path after: //dom[@caption='Google']//input[#'lst-ib']
However, there is a catch. Because of the double slash Ranorex will search the whole tree of the host for the dom. Meaning, all open applications. This could have a performance impact.
For more info please see: http://www.ranorex.com/support/user-gui ... xpath.html
Another possibility would be to record two repositories, one for the browser and one for the desktop app. This would not impact your performance but it is more work for you.
Please let me know if this helped.
Regards,
McTurtle
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Same test case different envirnment
That's a quite dangerous path, I would refrain from using that. "//" at the beginning of an XPath (or RanoreXPath) means "search everything(!)", i.e the whole element tree" which could virtually take forever...McTurtle wrote://dom[@caption='Google']//input[#'lst-ib']
In case only the adapter part is different, you can use a "*" instead of the "dom" which is a placeholder for "any adapter". Without seeing a Ranorex snapshot, I can't say for sure that this will work, though...
Regards,
Alex
Ranorex Team