Code:
Code: Select all
/*
* Created by Ranorex
* User: mjones10
* Date: 4/20/2020
* Time: 4:01 PM
*
* To change this template use Tools > Options > Coding > Edit standard headers.
*/
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 MyTest15
{
/// <summary>
/// Description of UserCodeModule1.
/// </summary>
[TestModule("35A74F2E-20EF-4C02-B554-FFC6CF0F0560", ModuleType.UserCode, 1)]
public class Launch_ca : ITestModule
{
/// <summary>
/// Constructs a new instance.
/// </summary>
public Launch_ca()
{
// 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;
MyTest15.MyTest15Repository my_repo = new MyTest15Repository();
var service_location = my_repo.service_location;
service_location.WaitForExists(120);
var drop_down = my_repo.service_location.drop_down;
drop_down.PressKeys("Columbus 0044{Return}");
var columbus_text = my_repo.service_location.drop_down.SelectedItemText;
var ok_btn = my_repo.service_location.ok_btn;
ok_btn.Click();
}
}
}
Error:
'MyTest15.MyTest15RepositoryFolders.Service_locationAppFolder' does not contain a definition for 'WaitForExists' and no extension method 'WaitForExists' accepting a first argument of type 'MyTest15.MyTest15RepositoryFolders.Service_locationAppFolder' could be found (are you missing a using directive or an assembly reference?) (CS1061) - C:\Users\mjones10\Documents\Ranorex\RanorexStudio Projects\MyTest15\MyTest15\launch_ca.cs:51,30
When I remove the WaitForExists line, the program works as expected.
I'm writing my code_modules in the ranorex studio editor, but the methods mentioned above don't appear in the editors auto-complete pop-up after I type `RepositoryItemInfo.`, or when i just try to type either method alone. Only `Equals` and `ReferenceEquals` appear as methods after the `RepositoryItemInfo.` library. Additionally, I found an Exists() method under the validate library @ Validate.Exists() (could i perhaps use this to mimic a WaitUntilExists method?). I've seen other posts where it was suggested that people experiencing issues like this remove the ranorex references and reopen the project in Ranorex Studio(because the project was outdated), but this is a project i started within the last couple of days. I'm running Ranorex 9.0.0 . Suggestions & thoughts are appreciated