Hi everyone,
I am interested to know what will be the right way to define object repository programmatically without any recording.
I am trying to create test suite using Visual Studio 2017, SpecFlow and Nunit framework for functional BDD test framework.
My target is to have set of objects that can be defined before run and accessible during run, something similar to PageObject model in web testing.
Any code examples would be highly appreciated.
Thanks,
Felix.
How to define repository item programmatically.
Re: How to define repository item programmatically.
Hi,
I'm afraid, there is currently no way to define repository elements programmatically. In fact, if you are going to use pure Ranorex libs in VS (i.e. without Ranorex Studio), you will have to live without Ranorex repository, which is exclusive to Ranorex Studio (as well as test suites and other goodies).
What you will have to do is to create your own set of Ranorex xpaths, kept in source code of your tests and eventually, use Find method and its derivatives, to find elements based of existing xpaths or certain attributes. Unfortunately, without seeing your AUT and tests you are supposed to automate, it's impossible to provide you with examples related to your problem.
I'm afraid, there is currently no way to define repository elements programmatically. In fact, if you are going to use pure Ranorex libs in VS (i.e. without Ranorex Studio), you will have to live without Ranorex repository, which is exclusive to Ranorex Studio (as well as test suites and other goodies).
What you will have to do is to create your own set of Ranorex xpaths, kept in source code of your tests and eventually, use Find method and its derivatives, to find elements based of existing xpaths or certain attributes. Unfortunately, without seeing your AUT and tests you are supposed to automate, it's impossible to provide you with examples related to your problem.
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: How to define repository item programmatically.
Hi odklizec,
Thank you for replay.
I had to create my own "repository" almost the same way it is done within Ranorex.
If anyone will be interested I can drop an example later.
Thanks,
Felix.
Thank you for replay.
I had to create my own "repository" almost the same way it is done within Ranorex.
If anyone will be interested I can drop an example later.
Thanks,
Felix.
Re: How to define repository item programmatically.
Yes please. Would like to know how you did it.