Sembi IQ Assistant generates answers using Ranorex documentation, the Ranorex API reference, and the Code Cookbook.
The assistant uses the information you provide in the current conversation to understand your question and follow-up prompts. It cannot access your Ranorex project, repository, tests, logs, or results unless you describe the relevant information.
Providing clear context helps the assistant generate more useful answers and code examples.
Protect sensitive information
Before including an error message, code sample, log entry, file path, or project identifier in a prompt, remove or replace any sensitive information. Use neutral sample values when the real values are not required to explain the problem.
Only share proprietary code or technical identifiers when your organization allows that information to be processed by an external AI service.
For more information about how prompts and responses are processed, see Sembi IQ Assistant Privacy and Data Use.
Understand how the assistant uses your prompts
When writing prompts, consider the following:
- The assistant uses your current prompt and earlier messages from the same conversation.
- Conversation history is retained only for the current Ranorex Studio session. Repeat the relevant information when you start a new session.
- The assistant cannot inspect or modify your Ranorex project.
- Questions outside the available Ranorex product resources may produce incomplete or inaccurate answers.
- AI-generated answers and code may be incorrect. Review and test them before use.
- Each submitted prompt counts toward the daily usage limit. A focused initial prompt may reduce the number of follow-up prompts you need.
- You can write prompts in any language. The assistant responds in the language used in your prompt.
Write an effective prompt
Use the following practices to improve your results:
- Give context: Say that you use Ranorex Studio, which technology you are testing—for example, WPF, WinForms, or web—and what you are trying to do.
- Ask one thing at a time: Use follow-up prompts in the same session to refine the answer.
- Use exact names: Copy error messages exactly as shown, and use the exact names from your project.
- Say what you have tried and what happened.
- Say what form of answer you want: Short steps, an explanation, a table, or only code.
- State your constraints, for example, what the answer must not do.
- Write in your own language: The assistant answers in the language of your prompt.
Prompt examples
| Less effective | More effective |
| How do I wait? | In Ranorex Studio, how can I wait up to 10 seconds for a repository item to become visible before clicking it? I write my user code in C#. |
| Fix my test. | My test fails during step 4 with the following sanitized error: [error message]. The failure occurs when the test attempts to open a window. What are the common causes, and what should I check first? |
| Ranorex cannot find my button. | Ranorex cannot find a button in my WPF application during playback, although it works in Ranorex Spy. What are the common causes (for example, timing, dynamic attributes, or the wrong technology adapter), and in what order should I check them? |
Request code examples
Sembi IQ Assistant can generate C# code examples for Ranorex automation tasks. However, it cannot inspect your project and does not know your namespaces, class names, repository structure, or item names unless you provide them.
Generated code does not modify your project automatically. You must review, adapt, and add the code to the appropriate location.
Information to include
When requesting code, provide the following information when relevant:
- Product and context: For example, "I'm using Ranorex Studio."
- Project namespace and class names: For example, your project namespace and your repository class.
- Exact names from your project: For example, the exact repository item names as shown in your .rxrep file.
- What the code must do, in order: Include logging and reporting, for example, Report.Info after each step and Report.Success or Report.Error at the end.
- Where the code goes: For example, a method inside an existing partial class, called by a User Code action in a recording, or a standalone module.
- Hard requirements for the output: For example, one complete code block that is ready to paste with no edits; no invented or placeholder names; ask me for any detail you do not have instead of guessing; skip documentation links and general background.
Example code prompt
The following example uses fictional project identifiers:
...
I'm using Ranorex Studio.
Project namespace: MyTest365.
Repository class: MyTest365Repository.
Exact repository item names as shown in my .rxrep file: Calculator.Num1Button, Calculator.PlusButton, Calculator.Num2Button, Calculator.EqualButton.
I want to click these 4 buttons in order (Num1 → Plus → Num2 → Equal) with Report.Info logging after each click and Report.Success/Report.Error at the end.
This code will be added as a method inside my existing Recording1 partial class, called via a "User Code" action in the Recording — not as a standalone ITestModule.
Hard requirements:
Give exactly one final code block, complete and ready to paste with zero edits.
Do not invent, guess, or use placeholder names for anything — namespaces, folder names, item names, GUIDs, or otherwise. If you need a name or detail you don't already have from me, ask me for it before writing any code, instead of guessing.
Do not use placeholder values like "YOUR-MODULE-GUID" — if a GUID is genuinely required for this approach, tell me that and explain how I generate one; otherwise avoid needing one at all.
Skip documentation links and general background — just the code and, if something is ambiguous, the specific question you need answered first.
...Why this prompt is effective
The example:
- The first paragraph supplies the namespace, the repository class, and the exact item names, so the assistant does not invent them.
- The second paragraph states the steps in order and the reporting you want.
- The third paragraph says where the code goes, which changes how the code is written.
- The hard requirements tell the assistant to ask when it lacks information, which prevents guessed names and placeholders.
Code prompt template
Replace the text in square brackets with your own values:
I'm using Ranorex Studio.
Project namespace: [your namespace].
Repository class: [your repository class].
Exact repository item names as shown in my .rxrep file: [item names, comma separated].
I want to [describe what the code must do, in order, including the logging and reporting you want].
This code will be added as [where the code goes].
Hard requirements:
Give exactly one final code block, complete and ready to paste with zero edits.
Do not invent, guess, or use placeholder names for anything. If you need a name or detail you do not have from me, ask me before writing any code.
Skip documentation links and general background.Review generated code
- The assistant may ask you a question before it writes code. Answer it in the same session, and it will continue with your answer.
- The assistant provides code snippets, not complete tests, and it does not change your project. Review and run the code before you rely on it.
- If the code is not what you need, reply in the same session with the specific problem, for example, the compiler error or the wrong name. If a session gets long, start a new one and repeat the key details.