Hi All,
I add an issue that was solved by support (Robert Prehm), just sharing it.
for experts:
just add your repo.XpathValue = yourCodeModuleVariable.
for beginners:
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):
[img] [/img]
/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:
[img] [/img]
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
How to use Xpath Variable in Code Module (example)
How to use Xpath Variable in Code Module (example)
You do not have the required permissions to view the files attached to this post.
Best Regards
Tzahi Caspi
Tzahi Caspi