Error in Playback in compiled tests

Ranorex Spy, Recorder, and Studio.
Cbrowne
Posts: 1
Joined: Tue Aug 25, 2009 2:13 am

Error in Playback in compiled tests

Post by Cbrowne » Tue Aug 25, 2009 2:45 am

Hi,

I have a simple test running a vb.net 2.0 application. When I run the test from within Ranorex Studio the test plays back perfectly. When I run it from a compiled exe it fails at the besinning saying it cant find the main form.

2009/08/25 11:20:58.919 INFO User Mouse Left Click item 'ButtonCmdDataEntry (FormWBC_Stamping_Main_Menu__)' at 51;26.


2009/08/25 11:21:07.419 ERROR User Ranorex.ElementNotFoundException: Failed to find item 'ButtonCmdDataEntry' within the specified timeout of 5000ms. ---> Ranorex.ElementNotFoundException: The folder 'FormWBC_Stamping_Main_Menu__' was not found within the specified timeout of 5000ms. at Ranorex.Core.Repository.RepoGenBaseFolder.GetFolderElement(Boolean& isCached) at Ranorex.Core.Repository.RepoGenBaseFolder.CreateAdapterForPath[T](String itemName, String path, Duration searchTimeout, Nullable`1 useEnsureVisible) --- End of inner exception stack trace --- at Ranorex.Core.Repository.RepoGenBaseFolder.CreateAdapterForPath[T](String itemName, String path, Duration searchTimeout, Nullable`1 useEnsureVisible) at Stamping.Stamping.StampingRepositoryFolders.FormWBC_Stamping_Main_Menu__AppFolder.get_ButtonCmdDataEntry() in C:\work\RanorexStudio Projects\Stamping\Stamping\StampingRepository.vb:line 108 at Stamping.Stamping.AddARecord.Start() in C:\work\RanorexStudio Projects\Stamping\Stamping\AddARecord.vb:line 36 at Stamping.Stamping.Program.Main() in C:\work\RanorexStudio Projects\Stamping\Stamping\Program.vb:line 32

Any ideas? I can perform all my tests from within the Ranorex studio but as I cant run custom code without running it compiled, I a having issues. Note that I am using the Trial version downloaded last week 19/08/2009 and am evaluating the program for my employer.

Code being run:-
Report.Info("Mouse Left Click item 'FormWBC_Stamping_Main_Menu__ (FormWBC_Stamping_Main_Menu__)' at Center.")
repo.FormWBC_Stamping_Main_Menu__.FormWBC_Stamping_Main_Menu__.Click()
Delay.Milliseconds(200)
Report.Info("Mouse Left Click item 'ButtonCmdDataEntry (FormWBC_Stamping_Main_Menu__)' at Center.")
repo.FormWBC_Stamping_Main_Menu__.ButtonCmdDataEntry.Click()
Delay.Milliseconds(200)

I have also attached the spy info.


Thanks

Cameron
Attachments
Stamping.rxsnp
(125.74 KiB) Downloaded 270 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Error in Playback in compiled tests

Post by Support Team » Tue Aug 25, 2009 9:53 am

Hi Cameron!

My ideas:
  • Are you working on a 64 bit environment? If so, please read the following chapter in the Ranorex User Guide: http://www.ranorex.com/support/user-gui ... forms.html
  • You can also try to disable folder caching for the corresponding folder element, i.e. set the "Use Cache" configuration for the folder repository item to "False".
Could you please post the Ranorex version you use?
What do you mean by "run the test from within Ranorex Studio"? Do you click on the "Play" button on the opened recording or do you click on the play symbol (green triangle) in the Studio toolbar? (see http://www.ranorex.com/forum/post1990.h ... play#p1990)

Regards,
Alex
Ranorex Support Team
.
Image

ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Re: Error in Playback in compiled tests

Post by ohm » Tue Dec 15, 2009 7:17 pm

I am using 2.2.0 Extended Trial and having the same problem.

I am testing a browser toolbar here. Toolbar has 6 buttons. I use the following code to verify if all of them are present.

When I press the 'Play' button next to 'Record', ranorex finds all the buttons and test passes. But when I compile/build the solution or press the green triangle button on the studio toolbar, ranorex doesnt find the buttons and test fails.

I have followed the steps you mentioned above. Set it to 'Auto Processor'. I also checked Used Cache to False. Didn't work.

Please help.
Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Error in Playback in compiled tests

Post by Support Team » Tue Dec 15, 2009 7:30 pm

Please, update to the latest Ranorex version 2.2.1!
And please post the repository you use and the log file that is created when running the executable (containing the error message)!

Regards,
Alex
Ranorex Support Team
.
Image

ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Re: Error in Playback in compiled tests

Post by ohm » Tue Dec 15, 2009 8:48 pm

Thanks Alex for your reply.

I have upgraded to 2.2.1 (Thanks).
Still ranorex is not detecting the buttons when I compile.

I have attached the repository.

This is the error log:
2009/12/15 13:21:18.203 FAILURE Validation Element for item 'BT_MyFace_LOL' does not exist (Failed to find item 'BT_MyFace_LOL' within the specified timeout of 10s.).

2009/12/15 13:21:18.203 ERROR User Ranorex.ValidationException: Element for item 'BT_MyFace_LOL' does not exist (Failed to find item 'BT_MyFace_LOL' within the specified timeout of 10s.).
at Ranorex.Validate.IsTrue(Boolean condition, String message, Boolean exceptionOnFail)
at Ranorex.Validate.Exists(RepoItemInfo itemInfo, String message, Boolean exceptionOnFail)
at Ranorex.Validate.Exists(RepoItemInfo itemInfo)
at Search_Assistant.verify.VerifyToolbar() in c:\Documents and Settings\ishtiaq\My Documents\Ranorex Scripts\XP\IE7\Search_Assistant\Search_Assistant\verify.UserCode.cs:line 40
at Search_Assistant.verify.Start() in c:\Documents and Settings\ishtiaq\My Documents\Ranorex Scripts\XP\IE7\Search_Assistant\Search_Assistant\verify.cs:line 37
at Search_Assistant.Program.Main(String[] args) in c:\Documents and Settings\ishtiaq\My Documents\Ranorex Scripts\XP\IE7\Search_Assistant\Search_Assistant\Program.cs:line 37

Repository:

Code: Select all

///////////////////////////////////////////////////////////////////////////////
//
// This file was automatically generated by RANOREX.
// DO NOT MODIFY THIS FILE! It is regenerated by the designer.
// All your modifications will be lost!
// http://www.ranorex.com
//
///////////////////////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using Ranorex;
using Ranorex.Core;
using Ranorex.Core.Repository;

namespace Search_Assistant
{
	/// <summary>
	/// The class representing the Search_AssistantRepository element repository.
	/// </summary>
	[System.CodeDom.Compiler.GeneratedCode("Ranorex", "2.2.0")]
	public partial class Search_AssistantRepository : RepoGenBaseFolder
	{
		static Search_AssistantRepository instance;

		/// <summary>
		/// Gets the singleton class instance representing the Search_AssistantRepository element repository.
		/// </summary>
		public static Search_AssistantRepository Instance {
			get { return instance; }
		}

		/// <summary>
		/// Repository class static constructor.
		/// </summary>
		static Search_AssistantRepository()
		{
			instance = new Search_AssistantRepository();
		}

		Search_AssistantRepositoryFolders.BrowserWindowAppFolder _browserwindow;
		Search_AssistantRepositoryFolders.File_DownloadAppFolder _file_download;
		Search_AssistantRepositoryFolders.Security_WarningAppFolder _security_warning;
		Search_AssistantRepositoryFolders.Terms_and_ConditionsAppFolder _terms_and_conditions;
		Search_AssistantRepositoryFolders.MyWebTattooAppFolder _mywebtattoo;

		/// <summary>
		/// Repository class constructor.
		/// </summary>
		private Search_AssistantRepository() : base("Search_AssistantRepository", "", null, 30000, false)
		{
			_browserwindow = new Search_AssistantRepositoryFolders.BrowserWindowAppFolder(null);
			_file_download = new Search_AssistantRepositoryFolders.File_DownloadAppFolder(null);
			_security_warning = new Search_AssistantRepositoryFolders.Security_WarningAppFolder(null);
			_terms_and_conditions = new Search_AssistantRepositoryFolders.Terms_and_ConditionsAppFolder(null);
			_mywebtattoo = new Search_AssistantRepositoryFolders.MyWebTattooAppFolder(null);
		}

		/// <summary>
		/// The BrowserWindow folder.
		/// </summary>
		public virtual Search_AssistantRepositoryFolders.BrowserWindowAppFolder BrowserWindow
		{
			get { return _browserwindow; }
		}

		/// <summary>
		/// The File_Download folder.
		/// </summary>
		public virtual Search_AssistantRepositoryFolders.File_DownloadAppFolder File_Download
		{
			get { return _file_download; }
		}

		/// <summary>
		/// The Security_Warning folder.
		/// </summary>
		public virtual Search_AssistantRepositoryFolders.Security_WarningAppFolder Security_Warning
		{
			get { return _security_warning; }
		}

		/// <summary>
		/// The Terms_and_Conditions folder.
		/// </summary>
		public virtual Search_AssistantRepositoryFolders.Terms_and_ConditionsAppFolder Terms_and_Conditions
		{
			get { return _terms_and_conditions; }
		}

		/// <summary>
		/// The MyWebTattoo folder.
		/// </summary>
		public virtual Search_AssistantRepositoryFolders.MyWebTattooAppFolder MyWebTattoo
		{
			get { return _mywebtattoo; }
		}
	}

	/// <summary>
	/// Inner folder classes.
	/// </summary>
	public partial class Search_AssistantRepositoryFolders
	{
		/// <summary>
		/// The BrowserWindowAppFolder folder.
		/// </summary>
		public partial class BrowserWindowAppFolder : RepoGenBaseFolder
		{
			private Search_AssistantRepositoryFolders.FBS_barFolder _fbs_bar;
			private RepoItemInfo _url_barInfo;
			private RepoItemInfo _tb_barInfo;
			private RepoItemInfo _sr_barInfo;
			private RepoItemInfo _no_resultInfo;
			private RepoItemInfo _yes_resultInfo;
			private RepoItemInfo _wholetoolbarInfo;
			private RepoItemInfo _selfInfo;

			/// <summary>
			/// Creates a new BrowserWindow  folder.
			/// </summary>
			public BrowserWindowAppFolder(RepoGenBaseFolder parentFolder) :
					base("BrowserWindow", "/form[@title~'Windows Internet Explorer']", null, 30000, true)
			{
				_fbs_bar = new Search_AssistantRepositoryFolders.FBS_barFolder(this);
				_url_barInfo = new RepoItemInfo(this, "URL_bar", "element[@class='WorkerW']/form/element[@controlid='41477']/combobox/text[@controlid='41477']", 10000, null);
				_tb_barInfo = new RepoItemInfo(this, "TB_bar", "element[@class='InternetToolbarHost']/*/*/*/element[@controlid='1025']/text[@controlid='1001']", 10000, null);
				_sr_barInfo = new RepoItemInfo(this, "SR_bar", "element[@class='WorkerW']/*/element[@class='UniversalSearchBand']/*/*/text[@class='Edit']", 10000, null);
				_no_resultInfo = new RepoItemInfo(this, "no_result", ".//div[@innertext~'^Sorry,\\ no\\ search\\ results\\ ']", 10000, null);
				_yes_resultInfo = new RepoItemInfo(this, "yes_result", ".//p[@innertext='Search Results by: ']", 10000, null);
				_wholetoolbarInfo = new RepoItemInfo(this, "WholeToolbar", ".//toolbar[@accessiblerole='ToolBar']", 10000, null);
				_selfInfo = new RepoItemInfo(this, "Self", "", 30000, null);
			}

			/// <summary>
			/// The URL_bar item.
			/// </summary>
			public virtual Ranorex.Text URL_bar
			{
				get
				{
					return _url_barInfo.CreateAdapter<Ranorex.Text>(true);
				}
			}

			/// <summary>
			/// The URL_bar item info.
			/// </summary>
			public virtual RepoItemInfo URL_barInfo
			{
				get
				{
					return _url_barInfo;
				}
			}

			/// <summary>
			/// The TB_bar item.
			/// </summary>
			public virtual Ranorex.Text TB_bar
			{
				get
				{
					return _tb_barInfo.CreateAdapter<Ranorex.Text>(true);
				}
			}

			/// <summary>
			/// The TB_bar item info.
			/// </summary>
			public virtual RepoItemInfo TB_barInfo
			{
				get
				{
					return _tb_barInfo;
				}
			}

			/// <summary>
			/// The SR_bar item.
			/// </summary>
			public virtual Ranorex.Text SR_bar
			{
				get
				{
					return _sr_barInfo.CreateAdapter<Ranorex.Text>(true);
				}
			}

			/// <summary>
			/// The SR_bar item info.
			/// </summary>
			public virtual RepoItemInfo SR_barInfo
			{
				get
				{
					return _sr_barInfo;
				}
			}

			/// <summary>
			/// The no_result item.
			/// </summary>
			public virtual Ranorex.DivTag no_result
			{
				get
				{
					return _no_resultInfo.CreateAdapter<Ranorex.DivTag>(true);
				}
			}

			/// <summary>
			/// The no_result item info.
			/// </summary>
			public virtual RepoItemInfo no_resultInfo
			{
				get
				{
					return _no_resultInfo;
				}
			}

			/// <summary>
			/// The yes_result item.
			/// </summary>
			public virtual Ranorex.PTag yes_result
			{
				get
				{
					return _yes_resultInfo.CreateAdapter<Ranorex.PTag>(true);
				}
			}

			/// <summary>
			/// The yes_result item info.
			/// </summary>
			public virtual RepoItemInfo yes_resultInfo
			{
				get
				{
					return _yes_resultInfo;
				}
			}

			/// <summary>
			/// The WholeToolbar item.
			/// </summary>
			public virtual Ranorex.ToolBar WholeToolbar
			{
				get
				{
					return _wholetoolbarInfo.CreateAdapter<Ranorex.ToolBar>(true);
				}
			}

			/// <summary>
			/// The WholeToolbar item info.
			/// </summary>
			public virtual RepoItemInfo WholeToolbarInfo
			{
				get
				{
					return _wholetoolbarInfo;
				}
			}

			/// <summary>
			/// The Self item.
			/// </summary>
			public virtual Ranorex.Form Self
			{
				get
				{
					return _selfInfo.CreateAdapter<Ranorex.Form>(true);
				}
			}

			/// <summary>
			/// The Self item info.
			/// </summary>
			public virtual RepoItemInfo SelfInfo
			{
				get
				{
					return _selfInfo;
				}
			}

			/// <summary>
			/// The FBS_bar folder.
			/// </summary>
			public virtual Search_AssistantRepositoryFolders.FBS_barFolder FBS_bar
			{
				get { return _fbs_bar; }
			}
		}

		/// <summary>
		/// The FBS_barFolder folder.
		/// </summary>
		public partial class FBS_barFolder : RepoGenBaseFolder
		{
			private RepoItemInfo _bt_add_buttonsInfo;
			private RepoItemInfo _bt_myface_lolInfo;
			private RepoItemInfo _bt_tattoodleInfo;
			private RepoItemInfo _bt_wallpaperInfo;
			private RepoItemInfo _bt_tattoosInfo;
			private RepoItemInfo _bt_tattoonsInfo;
			private RepoItemInfo _selfInfo;

			/// <summary>
			/// Creates a new FBS_bar  folder.
			/// </summary>
			public FBS_barFolder(RepoGenBaseFolder parentFolder) :
					base("FBS_bar", "element[@class='InternetToolbarHost']/*/*/*/toolbar", parentFolder, 10000, false)
			{
				_bt_add_buttonsInfo = new RepoItemInfo(this, "BT_Add_Buttons", "button[@accessiblename='Add Buttons']", 10000, null);
				_bt_myface_lolInfo = new RepoItemInfo(this, "BT_MyFace_LOL", "button[@accessiblename='MyFace LOL']", 10000, null);
				_bt_tattoodleInfo = new RepoItemInfo(this, "BT_Tattoodle", "button[@accessiblename='Tattoodle']", 10000, null);
				_bt_wallpaperInfo = new RepoItemInfo(this, "BT_Wallpaper", "button[@accessiblename='Wallpaper']", 10000, null);
				_bt_tattoosInfo = new RepoItemInfo(this, "BT_Tattoos", "button[@accessiblename='Tattoos']", 10000, null);
				_bt_tattoonsInfo = new RepoItemInfo(this, "BT_Tattoons", ".//button[6]", 10000, null);
				_selfInfo = new RepoItemInfo(this, "Self", "", 10000, null);
			}

			/// <summary>
			/// The BT_Add_Buttons item.
			/// </summary>
			public virtual Ranorex.Button BT_Add_Buttons
			{
				get
				{
					return _bt_add_buttonsInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BT_Add_Buttons item info.
			/// </summary>
			public virtual RepoItemInfo BT_Add_ButtonsInfo
			{
				get
				{
					return _bt_add_buttonsInfo;
				}
			}

			/// <summary>
			/// The BT_MyFace_LOL item.
			/// </summary>
			public virtual Ranorex.Button BT_MyFace_LOL
			{
				get
				{
					return _bt_myface_lolInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BT_MyFace_LOL item info.
			/// </summary>
			public virtual RepoItemInfo BT_MyFace_LOLInfo
			{
				get
				{
					return _bt_myface_lolInfo;
				}
			}

			/// <summary>
			/// The BT_Tattoodle item.
			/// </summary>
			public virtual Ranorex.Button BT_Tattoodle
			{
				get
				{
					return _bt_tattoodleInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BT_Tattoodle item info.
			/// </summary>
			public virtual RepoItemInfo BT_TattoodleInfo
			{
				get
				{
					return _bt_tattoodleInfo;
				}
			}

			/// <summary>
			/// The BT_Wallpaper item.
			/// </summary>
			public virtual Ranorex.Button BT_Wallpaper
			{
				get
				{
					return _bt_wallpaperInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BT_Wallpaper item info.
			/// </summary>
			public virtual RepoItemInfo BT_WallpaperInfo
			{
				get
				{
					return _bt_wallpaperInfo;
				}
			}

			/// <summary>
			/// The BT_Tattoos item.
			/// </summary>
			public virtual Ranorex.Button BT_Tattoos
			{
				get
				{
					return _bt_tattoosInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BT_Tattoos item info.
			/// </summary>
			public virtual RepoItemInfo BT_TattoosInfo
			{
				get
				{
					return _bt_tattoosInfo;
				}
			}

			/// <summary>
			/// The BT_Tattoons item.
			/// </summary>
			public virtual Ranorex.Button BT_Tattoons
			{
				get
				{
					return _bt_tattoonsInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BT_Tattoons item info.
			/// </summary>
			public virtual RepoItemInfo BT_TattoonsInfo
			{
				get
				{
					return _bt_tattoonsInfo;
				}
			}

			/// <summary>
			/// The Self item.
			/// </summary>
			public virtual Ranorex.ToolBar Self
			{
				get
				{
					return _selfInfo.CreateAdapter<Ranorex.ToolBar>(true);
				}
			}

			/// <summary>
			/// The Self item info.
			/// </summary>
			public virtual RepoItemInfo SelfInfo
			{
				get
				{
					return _selfInfo;
				}
			}
		}

		/// <summary>
		/// The File_DownloadAppFolder folder.
		/// </summary>
		public partial class File_DownloadAppFolder : RepoGenBaseFolder
		{
			private RepoItemInfo _btrunInfo;
			private RepoItemInfo _selfInfo;

			/// <summary>
			/// Creates a new File_Download  folder.
			/// </summary>
			public File_DownloadAppFolder(RepoGenBaseFolder parentFolder) :
					base("File_Download", "/form[@title~'^File Download']", null, 30000, true)
			{
				_btrunInfo = new RepoItemInfo(this, "BTrun", "button[@text='&Run']", 10000, null);
				_selfInfo = new RepoItemInfo(this, "Self", "", 30000, null);
			}

			/// <summary>
			/// The BTrun item.
			/// </summary>
			public virtual Ranorex.Button BTrun
			{
				get
				{
					return _btrunInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BTrun item info.
			/// </summary>
			public virtual RepoItemInfo BTrunInfo
			{
				get
				{
					return _btrunInfo;
				}
			}

			/// <summary>
			/// The Self item.
			/// </summary>
			public virtual Ranorex.Form Self
			{
				get
				{
					return _selfInfo.CreateAdapter<Ranorex.Form>(true);
				}
			}

			/// <summary>
			/// The Self item info.
			/// </summary>
			public virtual RepoItemInfo SelfInfo
			{
				get
				{
					return _selfInfo;
				}
			}
		}

		/// <summary>
		/// The Security_WarningAppFolder folder.
		/// </summary>
		public partial class Security_WarningAppFolder : RepoGenBaseFolder
		{
			private RepoItemInfo _btrun2Info;
			private RepoItemInfo _selfInfo;

			/// <summary>
			/// Creates a new Security_Warning  folder.
			/// </summary>
			public Security_WarningAppFolder(RepoGenBaseFolder parentFolder) :
					base("Security_Warning", "/form[@title~'Security Warning']", null, 30000, true)
			{
				_btrun2Info = new RepoItemInfo(this, "BTrun2", "button[@text='&Run']", 10000, null);
				_selfInfo = new RepoItemInfo(this, "Self", "", 30000, null);
			}

			/// <summary>
			/// The BTrun2 item.
			/// </summary>
			public virtual Ranorex.Button BTrun2
			{
				get
				{
					return _btrun2Info.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BTrun2 item info.
			/// </summary>
			public virtual RepoItemInfo BTrun2Info
			{
				get
				{
					return _btrun2Info;
				}
			}

			/// <summary>
			/// The Self item.
			/// </summary>
			public virtual Ranorex.Form Self
			{
				get
				{
					return _selfInfo.CreateAdapter<Ranorex.Form>(true);
				}
			}

			/// <summary>
			/// The Self item info.
			/// </summary>
			public virtual RepoItemInfo SelfInfo
			{
				get
				{
					return _selfInfo;
				}
			}
		}

		/// <summary>
		/// The Terms_and_ConditionsAppFolder folder.
		/// </summary>
		public partial class Terms_and_ConditionsAppFolder : RepoGenBaseFolder
		{
			private RepoItemInfo _btiagreeInfo;
			private RepoItemInfo _btnextInfo;
			private RepoItemInfo _selfInfo;

			/// <summary>
			/// Creates a new Terms_and_Conditions  folder.
			/// </summary>
			public Terms_and_ConditionsAppFolder(RepoGenBaseFolder parentFolder) :
					base("Terms_and_Conditions", "/form[@title='My Web Tattoo']", null, 30000, true)
			{
				_btiagreeInfo = new RepoItemInfo(this, "BTiagree", "button[@text='I Agree']", 10000, null);
				_btnextInfo = new RepoItemInfo(this, "BTnext", "button[@text='Next']", 10000, null);
				_selfInfo = new RepoItemInfo(this, "Self", "", 30000, null);
			}

			/// <summary>
			/// The BTiagree item.
			/// </summary>
			public virtual Ranorex.Button BTiagree
			{
				get
				{
					return _btiagreeInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BTiagree item info.
			/// </summary>
			public virtual RepoItemInfo BTiagreeInfo
			{
				get
				{
					return _btiagreeInfo;
				}
			}

			/// <summary>
			/// The BTnext item.
			/// </summary>
			public virtual Ranorex.Button BTnext
			{
				get
				{
					return _btnextInfo.CreateAdapter<Ranorex.Button>(true);
				}
			}

			/// <summary>
			/// The BTnext item info.
			/// </summary>
			public virtual RepoItemInfo BTnextInfo
			{
				get
				{
					return _btnextInfo;
				}
			}

			/// <summary>
			/// The Self item.
			/// </summary>
			public virtual Ranorex.Form Self
			{
				get
				{
					return _selfInfo.CreateAdapter<Ranorex.Form>(true);
				}
			}

			/// <summary>
			/// The Self item info.
			/// </summary>
			public virtual RepoItemInfo SelfInfo
			{
				get
				{
					return _selfInfo;
				}
			}
		}

		/// <summary>
		/// The MyWebTattooAppFolder folder.
		/// </summary>
		public partial class MyWebTattooAppFolder : RepoGenBaseFolder
		{
			private RepoItemInfo _btclickhereInfo;
			private RepoItemInfo _selfInfo;

			/// <summary>
			/// Creates a new MyWebTattoo  folder.
			/// </summary>
			public MyWebTattooAppFolder(RepoGenBaseFolder parentFolder) :
					base("MyWebTattoo", "/dom[@caption='My Web Tattoo']", null, 30000, true)
			{
				_btclickhereInfo = new RepoItemInfo(this, "BTclickhere", "body/form/div[@id='pnltop']/div[@id='container']/div/div[@id='button']/input[@id='ibClickHere']", 10000, null);
				_selfInfo = new RepoItemInfo(this, "Self", "", 30000, null);
			}

			/// <summary>
			/// The BTclickhere item.
			/// </summary>
			public virtual Ranorex.InputTag BTclickhere
			{
				get
				{
					return _btclickhereInfo.CreateAdapter<Ranorex.InputTag>(true);
				}
			}

			/// <summary>
			/// The BTclickhere item info.
			/// </summary>
			public virtual RepoItemInfo BTclickhereInfo
			{
				get
				{
					return _btclickhereInfo;
				}
			}

			/// <summary>
			/// The Self item.
			/// </summary>
			public virtual Ranorex.WebDocument Self
			{
				get
				{
					return _selfInfo.CreateAdapter<Ranorex.WebDocument>(true);
				}
			}

			/// <summary>
			/// The Self item info.
			/// </summary>
			public virtual RepoItemInfo SelfInfo
			{
				get
				{
					return _selfInfo;
				}
			}
		}

	}
}

Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Error in Playback in compiled tests

Post by Support Team » Tue Dec 15, 2009 10:01 pm

Are you working on a 64 bit Windows operating system? If so, please, try to set the processor type of in the compiler options to "32-bit Intel-compatible processor" (see http://www.ranorex.com/support/user-gui ... forms.html in the Ranorex User Guide for more info). On 64 bit operating systems, the bit width type of the Ranorex executable must always match the bit width of the automated application.

Did you try to record the actions for that recording again, i.e. to make a completely new recording and new repository that does the same actions as before?

If that does not work either, please send your project to support_at_ranorex.com, so we can have a deeper look into that issue.

Regards,
Alex
Ranorex Support Team
.
Image

ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Re: Error in Playback in compiled tests

Post by ohm » Tue Dec 15, 2009 11:24 pm

Thanks Alex for all your help.

I have tried in so many ways. Couldn't make it work. Strange thing is it works if I dont include the following on the top:
System.Diagnostics.Process.Start("iexplore.exe");

If the IE windows is already open, it verifies without a problem. But if I open a new IE window by ranorex and want to verify the buttons, it does not work.

Any clue?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Error in Playback in compiled tests

Post by Support Team » Wed Dec 16, 2009 11:14 am

ohm wrote:If the IE windows is already open, it verifies without a problem. But if I open a new IE window by ranorex and want to verify the buttons, it does not work.
Well, that should be a solvable problem then. Please, answer all the questions below!
  • Once again, are you working on a 64 bit machine?
On a 64 bit machine there are two types of Internet Explorer, a 32 bit and 64 bit version, one located in the "Program Files (x86)" (32 bit) folder and one in "Program Files" (64 bit). You should set the processor type to 32 bit and try starting the IExplore.exe from the "Program Files (x86)" folder.

Another idea: The path for the toolbar "FBS_bar" folder could also be the problem.
  • Did you change the path of that folder?
  • Is the toolbar present when you start a new instance of IE?
  • Is the toolbar present in every tab?
Please, try to record starting a new instance of IE and accessing the button that causes the error!

Regards,
Alex
Ranorex Support Team
.
Image

ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Re: Error in Playback in compiled tests

Post by ohm » Wed Dec 16, 2009 5:04 pm

I am not using a 64bit machine.

I have recorded few times and still it does not work.

Is there any way I can email the whole solution to you as a zip file so you can take a look? I will also provide you more info about the application (toobar) I am testing.

Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Error in Playback in compiled tests

Post by Support Team » Wed Dec 16, 2009 5:39 pm

Another idea: Have you set the STAThread attribute to the Main method of the project?

As I already said in my last post, you can send the whole project and a Ranorex snapshot (see http://www.ranorex.com/support/user-gui ... html#c2072) to support_at_ranorex.com!

Regards,
Alex
Ranorex Support Team
.
Image

ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Re: Error in Playback in compiled tests

Post by ohm » Wed Dec 16, 2009 6:32 pm

Email sent.

Thanks Alex.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Error in Playback in compiled tests

Post by Support Team » Fri Dec 18, 2009 2:27 pm

From your project I could see that there is another invisible toolbar inside IE that only exists if IE is focused. So, when IE is focused, the "FBS_bar" folder finds the wrong toolbar element (the invisible one). Consequently, none of the items in that folder can be found, since Ranorex searches the wrong toolbar element.

We need to use some advanced RanoreXPath technique, namely identifying a parent folder through one of its children, to uniquely identify that folder. In your case that could be done by changing the path of the "FBS_bar" folder to "element[@class='InternetToolbarHost']/*/*/*/toolbar/button[@accessiblename='Tattoos']/parent::toolbar". This technique is described in the following Ranorex User Guide section: http://www.ranorex.com/support/user-gui ... html#c2462

For more information on advanced RanoreXPath techniques, please watch the "RanoreXPath Part One" and "RanoreXPath Part Two" screencasts:
http://www.ranorex.com/support/screencasts.html

Regards,
Alex
Ranorex Support Team
.
Image

ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Re: Error in Playback in compiled tests

Post by ohm » Mon Dec 21, 2009 4:42 pm

Works.
Great.
Thanks.