This is my first use of "Code: Select All," I hope it will be displayed properly.
Problem Description:
I inherited an app test suite with computer, and unfortunately the Test Developer did not provide, or created any type of “set up instructions." Consequently there are many conditions which I believe need to be met in order for the test cases to run successfully. Conditions such as; Monitor resolution, screen text size setting, positioning of the browser, etc..
I perceive the problem being that the browser is not positioned in the original location, and hence any other window form will also be at the wrong location. It is interesting that a URL link within the initial browser window is found, validated and launched, and yet it cannot minimize the browser.
In using Rx SPY, I observed and used the “location” settings displayed by Spy, in hopes of debugging the first failure I am encountering. I am assuming that I would have to set new location settings throughout the test cases, if this is the problem. I have tried the SPY: location, Mouse Relative, and Mouse Screen, location settings for debugging, but these settings have not solved the code failure.
It could be that the “CreateAdapter” class is not finding what it needs to function properly.
Single stepping through the code, I get up to this line, as shown in the “code snippet”;
return _javaconsoletigeruiautotestutInfo.CreateAdapter<Ranorex.TitleBar>(true)
On the next single step, the code automatically runs (I’m not allowed to single step, the button is grayed out.).
It is very evident where the failures start, as shown in the listed Java console output;
[Info ][Test]: Test Module 'MinimizeJavaConsole' started.
[Info ][Mouse]: click console header for focus
Mouse Left Click item 'JavaConsoleTIGERUIAutoTestUT.JavaConsoleTIGERUIAutoTestUT' at 1155;16.
[Error ][Module]: Failed to find item 'TigerSmokeSuiteRepository.JavaConsoleTIGERUIAutoTestUT.JavaConsoleTIGERUIAutoTestUT'.<br/>No
element found for path '/form[@title~'^Java\ Console\ -\ TIGER\ -\ UI']/titlebar[@accessiblerole='TitleBar']' within 1m.
[Failure][Test]: Test Module 'MinimizeJavaConsole' completed with status 'Failed'.
[Failure][Test]: Test Case 'SmokeSuitePSY' completed with status 'Failed'.
System Detailed description:
OS Name Microsoft Windows 7 Enterprise
Version 6.1.7601 Service Pack 1 Build 7601
System Model Precision WorkStation T3500
System Type x64-based PC
Processor Intel(R) Xeon(R) CPU W3530 @ 2.80GHz, 2800 Mhz, 4 Core(s), 4 Logical Processor(s)
BIOS Version/Date Dell Inc. A07, 4/12/2010
SMBIOS Version 2.5
Hardware Abstraction Layer Version = "6.1.7601.17514"
IE 8 Version: 8.0.7601.17514
Ranorex Developer Premium, Studio 4.1.1.15872 .NET Runtime Version 4.0.30319.18408
CODE: SELECT ALL
// /// <summary> /// The JavaConsoleTIGERUIAutoTestUTAppFolder folder. /// </summary> [RepositoryFolder("13139a93-11a5-4852-89db-312fb0d86054")] public partial class JavaConsoleTIGERUIAutoTestUTAppFolder : RepoGenBaseFolder { RepoItemInfo _javaconsoletigeruiautotestutInfo; RepoItemInfo _minimizeInfo; /// <summary> /// Creates a new JavaConsoleTIGERUIAutoTestUT folder. /// </summary> public JavaConsoleTIGERUIAutoTestUTAppFolder(RepoGenBaseFolder parentFolder) : base("JavaConsoleTIGERUIAutoTestUT", "/form[@title~'^Java\\ Console\\ -\\ TIGER\\ -\\ UI']", parentFolder, 30000, null, false, "13139a93-11a5-4852-89db-312fb0d86054", "") { _javaconsoletigeruiautotestutInfo = new RepoItemInfo(this, "JavaConsoleTIGERUIAutoTestUT", "titlebar[@accessiblerole='TitleBar']", 30000, null, "e6e86e2b-2376-402c-ac09-0336ca37468f"); _minimizeInfo = new RepoItemInfo(this, "Minimize", "titlebar/button[@accessiblename='Minimize']", 30000, null, "a4d817f9-a914-48f7-aea3-a91a75bc2805"); } /// <summary> /// The Self item. /// </summary> [RepositoryItem("13139a93-11a5-4852-89db-312fb0d86054")] public virtual Ranorex.Form Self { get { return _selfInfo.CreateAdapter<Ranorex.Form>(true); } } /// <summary> /// The Self item info. /// </summary> [RepositoryItemInfo("13139a93-11a5-4852-89db-312fb0d86054")] public virtual RepoItemInfo SelfInfo { get { return _selfInfo; } } /// <summary> /// The JavaConsoleTIGERUIAutoTestUT item. /// </summary> [RepositoryItem("e6e86e2b-2376-402c-ac09-0336ca37468f")] public virtual Ranorex.TitleBar JavaConsoleTIGERUIAutoTestUT { get { return _javaconsoletigeruiautotestutInfo.CreateAdapter<Ranorex.TitleBar>(true); } }
CODE: SELECT ALL
// /// <summary> /// Starts the replay of the static recording <see cref="Instance"/>. /// </summary> [System.CodeDom.Compiler.GeneratedCode("Ranorex", "4.1.1")] public static void Start() { TestModuleRunner.Run(Instance); } /// <summary> /// Performs the playback of actions in this recording. /// </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> [System.CodeDom.Compiler.GeneratedCode("Ranorex", "4.1.1")] void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.0; Init(); // click console header for focus Report.Log(ReportLevel.Info, "Mouse", "click console header for focus\r\nMouse Left Click item 'JavaConsoleTIGERUIAutoTestUT.JavaConsoleTIGERUIAutoTestUT' at 1155;16.", repo.JavaConsoleTIGERUIAutoTestUT.JavaConsoleTIGERUIAutoTestUTInfo, new RecordItemIndex(0)); repo.JavaConsoleTIGERUIAutoTestUT.JavaConsoleTIGERUIAutoTestUT.Click("1155;16", 280); // was this: //repo.JavaConsoleTIGERUIAutoTestUT.JavaConsoleTIGERUIAutoTestUT.Click("279;11", 280); Delay.Milliseconds(0);One puzzling aspect about this code is that the JavaConsole usage is not showing up within the recordings I have done. For example this line; JavaConsoleTIGERUIAutoTestUTAppFolder(RepoGenBaseFolder parentFolder). Could anyone identify what it might be?