Registration application

Ask general questions here.
yeni

Registration application

Post by yeni » Thu Jun 02, 2016 8:47 pm

Hi,

Am testing a patient registration application. where i want to measure the time taken to open the patient panel after login in into system and add the time to a text file.
var repo = TestRIS_iRepository.Instance;
            var username = repo.LogIn.Username;
            username.Click();
            username.PressKeys("tau1");
            
            var password = repo.LogIn.Password;
            password.Click();
            password.PressKeys("tau1");
            
            var logIn = repo.LogIn.LogIn;
            logIn.Click();
//want to check how much time taken, after clicking the login button utill the patient panel opens
            var patient = repo.CentricityRISI50.Patient;
            patient.Click();
            var registration = repo.CentricityRISI50.Registration;
            registration.Click()
;
Last edited by yeni on Fri Jun 10, 2016 11:43 pm, edited 2 times in total.

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: Registration application

Post by jma » Fri Jun 03, 2016 12:42 pm

Hi yeni,

Basically, Ranorex is based on the .NET framework which allows you to use any functionality of this framework. In your case, you could make use of the DateTime.Now property to measure the time between those actions.

In regard to writing information to a text file, I would suggest having a look at stackoverflow.

gowthamp
Posts: 16
Joined: Fri Feb 05, 2016 7:19 pm

Re: Registration application

Post by gowthamp » Fri Jun 03, 2016 2:26 pm

Hi Yeni,
I have to write time to text file after every module in our application and I think some of my code might help you.

Program.cs file will be executed once per test suite, so it will erase history from text file.

Sample.cs file will write time to test file.
In my scenario, I have to check whether report is executed successfully or not, so I had a check for success and failure. Success will write time taken for report to text file and failure doesn't write time but simple text (failed) to text file.

Hope this would help you. :D
Attachments
Sample.cs
(3.93 KiB) Downloaded 27 times
Program.cs
(1.83 KiB) Downloaded 29 times