Accessing records in a simple data connector

Class library usage, coding and language questions.
Posts: 41
Joined: Tue Aug 07, 2018 10:19 am

Accessing records in a simple data connector

Post by seurrep » Mon Jun 10, 2019 4:22 pm

We've recently been adding role based access to one of our applications. I have a list of usernames and passwords with one name & password for each user type stored in a simple data connector. Each row also contains a description telling anybody who has access to it which records relates to which user type.

Most the of the time I'll be looping through all of them as part of the testing, but there are cases where being able to find a particular user based on the description would be useful. something like getting the related username/password for a given role description for example will definitely come in useful (in essence using the simple data connector as a lookup table).

Is there a way of doing this either in code or by some other method?

User avatar
Ranorex Guru
Ranorex Guru
Posts: 6523
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Accessing records in a simple data connector

Post by odklizec » Wed Jun 12, 2019 8:19 am


I think this post could help you?... ... 83&#p45433
It's not direct answer to your question, but it should help you with basic 'simple data connector manipulation' code.

BTW, if I were you, I would skip using Simple data connector and replace it with somewhat more sophisticated CSV data connector. Simple data connector is stored directly in rxtst file, which makes is hard to edit and maintain. Additionally, extensive use of Simple data connector could significantly increase the size of rxtst file. On the other hand, externally stored CSV file is much more flexible and easier to edit and track changes. Plus it can be modified directly from code! Of course, you can modify also Simple data connector, but if I'm not mistaken, the changes will not be permanent. In other words, it's not possible to save changes of Simple data connector back to rxtst file (from code). Hence it's better to use CSV connector ;)
Pavel Kudrys
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