I add an issue that was solved by support (Robert Prehm), just sharing it.
just add your repo.XpathValue = yourCodeModuleVariable.
I will show how to use Variable in Xpath and then use it in a code module:
1. Browse http://www.ranorex.com/
2. Add features menu child xpath (Let’s call it FeaturDD):
/dom[@caption~'^Automated\ Testing\ Tools\ f']//ul[@class='dropdown-menu page-55-0']//a[@innertext='How It Works']
3. Change 'How It Works’ to Variable (by ranorex spy --> Path Editor, Use the dropdown): FeaturDD
Note: you can see this menu have 3 different optional Variable (tech…. what our ….).
4. Create a Code module to your test case:
5. At your code module:
a) Right click Insert New Module Variable, and give it a name: FeaturDD
b) Create an repository instance:
e.g.: var repo = MyCoolRepository.Instance;
c) Insert the variable to the repository
e.g. repo.FeaturDD = FeaturDD;
6. Create any data connector (e.g. excel) with FeaturDD column, and give one of the values: e.g. Technology Support.
Browse to Binding and click on Auto Binding.
Now each TestCase can browse to a different item
Special Thanks to Robert
Best practices, code snippets for common functionality, examples, and guidelines.
1 post • Page 1 of 1
You do not have the required permissions to view the files attached to this post.