Page 1 of 1

My C# modules is not working

Posted: Mon Nov 18, 2013 1:00 pm
by parthignp
Dear friends,

First am new for ranorex. I wrote the C# code for my project login page using ranorex tool. It executed successfully, But the frond end i mean my application login page nothing happen.

I mention the C# code is please have to look it and let me know..

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Drawing;
using System.Threading;
using WinForms = System.Windows.Forms;

using Ranorex;
using Ranorex.Core;
using Ranorex.Core.Testing;

namespace testing
{
/// <summary>
/// Description of hogaming.
/// </summary>
[TestModule("A909C9D2-6214-4BB6-91D4-D8F54E964116", ModuleType.UserCode, 1)]
public class Testing : ITestModule
{
public static readonly testing.testingRepository TestingRepo =testing.testingRepository.Instance;

public static void test()
{
TestingRepo.HGV3QC.LoginUserName.Click();
Keyboard.Press("[email protected]");
TestingRepo.HGV3QC.LoginPassword.Click();
Keyboard.Press("test123");
TestingRepo.HGV3QC.LoginButton.Click();
}

public static void maintest()
{
string mini = TestingRepo.HGV3QC.Sotester.Shape1.Element.GetAttributeValueText("Caption");
Report.Info("The Specified value"+mini);
}
/// <summary>
/// Constructs a new instance.
/// </summary>
public Testing()
{
// Do not delete - a parameterless constructor is required!
}

/// <summary>
/// Performs the playback of actions in this module.
/// </summary>
/// <remarks>You should not call this method directly, instead pass the module
/// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
/// that will in turn invoke this method.</remarks>
void ITestModule.Run()
{
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
// test();
maintest();
}
}
}

Re: Regarding doubt in ranorex

Posted: Mon Nov 18, 2013 5:10 pm
by Swisside
In the code you are executing did you uncomment the following ?
// test();

Regards