playing of recorded test case fails

Ranorex Studio, Spy, Recorder, and Driver.
sumedh
Posts: 4
Joined: Thu Jun 26, 2014 1:44 pm

playing of recorded test case fails

Post by sumedh » Fri Jun 27, 2014 12:33 pm

Hi,
In a flex based app, I have a recorded steps for loading/opening a new client URL and then entering a value in textInput field. Now I tried to play this recorded script, but I was shown a box which searches for the element with a timestamp of 1m and then I was shown Failed message, below is the error message which I copied from the .rxlog file.
Could anyone please me on this?

I have attached the Error message and Code
Error message:
Error Module
Jump to itemView Help
Failed to find item 'Test_AOERepository.KMITTVBetaGoogleChrome.Element156216320'.
No element found for path '/form[@title~'^KMIT\ TV\ Beta\ -\ Google\ Chr']/element[@controlid='156216320']' within 1m.
Show/Hide Stacktrace
at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException, Duration effectiveTimeoutOverride) at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException) at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException) at Test_AOE.Test_AOERepositoryFolders.KMITTVBetaGoogleChromeAppFolder.get_Element156216320() in d:\Ranorex\Test_AOE\Test_AOE\Test_AOE\Test_AOERepository.cs:line 130 at Test_AOE.Recording1.Ranorex.Core.Testing.ITestModule.Run() in d:\Ranorex\Test_AOE\Test_AOE\Test_AOE\Recording1.cs:line 86 at Ranorex.Core.Testing.TestSuiteModule.RunInternal(DataContext parentDataContext)


Code:

Code: Select all

            Report.Log(ReportLevel.Info, "Website", "Opening web site 'http://kmittv.com/' with browser 'chrome' in normal mode.", new RecordItemIndex(0));
            Host.Local.OpenBrowser("http://kmittv.com/", "chrome", "", false, false);
            Delay.Milliseconds(0);
            
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'KMITTVBetaGoogleChrome.Element156216320' at 1002;211.", repo.KMITTVBetaGoogleChrome.Element156216320Info, new RecordItemIndex(1));
            repo.KMITTVBetaGoogleChrome.Element156216320.Click("1002;211");
            Delay.Milliseconds(200);
            
            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'admin' with focus on 'KMITTVBetaGoogleChrome'.", repo.KMITTVBetaGoogleChrome.SelfInfo, new RecordItemIndex(2));
            repo.KMITTVBetaGoogleChrome.Self.PressKeys("admin");
            Delay.Milliseconds(0);
            
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'KMITTVBetaGoogleChrome.Element156216320' at 1040;241.", repo.KMITTVBetaGoogleChrome.Element156216320Info, new RecordItemIndex(3));
            repo.KMITTVBetaGoogleChrome.Element156216320.Click("1040;241");
            Delay.Milliseconds(200);
            
            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'pass' with focus on 'KMITTVBetaGoogleChrome'.", repo.KMITTVBetaGoogleChrome.SelfInfo, new RecordItemIndex(4));
            repo.KMITTVBetaGoogleChrome.Self.PressKeys("pass");
            Delay.Milliseconds(0);
            
            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'word' with focus on 'KMITTVBetaGoogleChrome'.", repo.KMITTVBetaGoogleChrome.SelfInfo, new RecordItemIndex(5));
            repo.KMITTVBetaGoogleChrome.Self.PressKeys("word");
            Delay.Milliseconds(0);
            
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'KMITTVBetaGoogleChrome.Element156216320' at 1053;292.", repo.KMITTVBetaGoogleChrome.Element156216320Info, new RecordItemIndex(6));
            repo.KMITTVBetaGoogleChrome.Element156216320.Click("1053;292");
            Delay.Milliseconds(200);

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: playing of recorded test case fails

Post by krstcs » Fri Jun 27, 2014 2:53 pm

The error says that Ranorex cannot find any item that matches the RanoreXPath specified for the object in question.

1. Check your path and make sure it is correct.
2. Make sure the object's identifying attribute(s) doesn't change at run-time (dynamic id, etc.).
3. Make sure the test step is being done in the correct place in the test.
Shortcuts usually aren't...

sumedh
Posts: 4
Joined: Thu Jun 26, 2014 1:44 pm

Re: playing of recorded test case fails

Post by sumedh » Sat Jun 28, 2014 10:53 am

Can you please help me in how to find the xPath for the flex components?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: playing of recorded test case fails

Post by Support Team » Wed Jul 02, 2014 4:09 pm

Hi,

In order to help you finding the right RxPath may I ask you to post a Ranorex snapshot file of your Flex application?
The following link will show you how to generate a snapshot file: Creating Ranorex Snapshot Files.

Thanks,
Markus