Testing / Ranorex Interview questions
What is a code module in Ranorex?
A code module is a test module written directly in C# or VB.NET against the Ranorex API, rather than produced by the Recorder.
It gives full programmatic control - loops, conditionals, custom exception handling, calls into external libraries - which makes it the right choice once a scenario needs logic that a linear list of recorded steps cannot express cleanly.
[TestModule("B1F4C9D2-...")] public class VerifyLogin : ITestModule { public void Run() { var loginBtn = repo.LoginForm.SignInButtonInfo; loginBtn.WaitForExists(TimeSpan.FromSeconds(10)); loginBtn.CreateAdapter<Button>(true).Click(); Validate.Attribute(repo.HomePage.WelcomeTextInfo, "Text", "Welcome back"); } }
Code modules and recording modules can be freely mixed inside the same test case, so a team can record the easy navigation steps and hand-code the parts that need real decision-making.
More Related questions...