本文整理汇总了C#中White.Core.UIItems.WindowItems.Window.Get方法的典型用法代码示例。如果您正苦于以下问题:C# Window.Get方法的具体用法?C# Window.Get怎么用?C# Window.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类White.Core.UIItems.WindowItems.Window
的用法示例。
在下文中一共展示了Window.Get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GivenIAmAtANon_BlackLevel
public void GivenIAmAtANon_BlackLevel()
{
_application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
_mainWindow = _application.GetWindow("MainWindow");
_mainWindow.Get<Button>("goToRedLevelButton").Click();
var firstPrinciple = _mainWindow.Get<ListBox>("principlesListView").Items[0];
Assert.That(firstPrinciple.Text, Is.StringContaining(Resource.DoNotRepeatYourself));
}
示例2: GivenIFinishMyRetrospectiveWithASuggestionToAdvanceToTheNextLevel
public void GivenIFinishMyRetrospectiveWithASuggestionToAdvanceToTheNextLevel()
{
File.Delete(@"..\..\CcdAddIn.TestHarness\bin\Debug\repository");
File.Copy(@"..\..\repository21perfectRetrospectives", @"..\..\CcdAddIn.TestHarness\bin\Debug\repository");
_application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
_mainWindow = _application.GetWindow("MainWindow");
_mainWindow.Get<Button>("retrospectiveButton").Click();
_mainWindow.Get<Button>("retrospectiveDoneButton").Click();
File.Delete("repository");
}
示例3: FindModalWindowBasedOnSearchCriteriaWhenThereIsNoWindow
public void FindModalWindowBasedOnSearchCriteriaWhenThereIsNoWindow()
{
window = application.GetWindow("Form1", InitializeOption.NoCache);
window.Get<Button>("launchModal").Click();
Window modalWindow = window.ModalWindow(SearchCriteria.ByText("ModalForm1"), InitializeOption.NoCache);
Assert.AreEqual(null, modalWindow);
}
示例4: Slide
public void Slide(Window window)
{
var thumb = window.Get<Thumb>("Splitter");
var originalY = thumb.Location.Y;
thumb.SlideVertically(50);
Assert.AreEqual(originalY + 50, thumb.Location.Y);
}
示例5: Slide
public void Slide(Window window)
{
var thumb = window.Get<Thumb>("Splitter");
double originalX = thumb.Location.X;
thumb.SlideHorizontally(50);
Assert.AreEqual(originalX + 50, thumb.Location.X);
}
示例6: getGridData
public void getGridData(Window win)
{
Thread.Sleep(1000);
table = win.Get<Table>(SearchCriteria.ByAutomationId("grdDisplay"));
TableRows rows = table.Rows;
row = rows[0];
// below line fails even though it is identified in Spy
TableCell cell = row.Cells[0];
String ab = cell.Value.ToString();
Console.WriteLine(ab + " Cell Data");
Console.ReadLine();
}
示例7: EditBoxEnter
public void EditBoxEnter(Window win, string Textboxname, string val)
{
TextBox TextObj = win.Get<TextBox>(SearchCriteria.ByAutomationId(Textboxname));
White.Core.InputDevices.AttachedKeyboard keyboard = win.Keyboard;
if (TextObj != null)
{
TextObj.Focus();
TextObj.RaiseClickEvent();
// below line fails
keyboard.Enter("Harriet");
// even below commented line fails
//TextObj.Enter(val);
//TextObj.BulkText = "My simple Text";
//Keyboard.Instance.Enter("my simple");
string aa = TextObj.Text;
Console.WriteLine(aa + " - Value Entered in Textbox");
}
}
示例8: BeforeTestRun
public static void BeforeTestRun()
{
app = Application.Launch("calc");
window = app.GetWindow("Calculator");
readout = (Label)window.Get(SearchCriteria.ByAutomationId(IDC_READOUT));
}
示例9: TestFixtureSetUp
protected override void TestFixtureSetUp()
{
window = Application.GetWindow("FormWithPropertyGrid");
propertyGrid = window.Get<PropertyGrid>("propertyGrid1");
}
示例10: FindModalWindow
public void FindModalWindow()
{
window = application.GetWindow("Form1", InitializeOption.NoCache);
window.Get<Button>("launchModal").Click();
Assert.AreEqual(false, window.IsModal);
}
示例11: GivenIStartAtTheRedLevel
public void GivenIStartAtTheRedLevel()
{
_application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
_mainWindow = _application.GetWindow("MainWindow");
_mainWindow.Get<Button>("goToRedLevelButton").Click();
}
示例12: BaseTestFixtureSetup
protected override void BaseTestFixtureSetup()
{
window = application.GetWindow("Form1", testConfiguration.WindowInitializeOption);
if (testConfiguration is SWTTestConfiguration) resultLabel = window.Get<Label>("result");
}
示例13: Find
public void Find(Window window)
{
var thumb = window.Get<Thumb>("Splitter");
Assert.AreNotEqual(null, thumb);
}
示例14: ClassInitialize
public static void ClassInitialize(TestContext testContext)
{
_app = Application.Launch(@"D:\Dev\PickAWinnerTDD\PickAWinnerTDD.UI\bin\Debug\PickAWinnerTDD.UI.exe");
_window = _app.GetWindow("Pick A Winner");
_window.Get<Button>(SearchCriteria.ByText("Admin")).Click();
}
示例15: TestFixtureSetUp
protected override void TestFixtureSetUp()
{
recorderApplication = Application.Attach(Process.Start("Recorder.exe"));
dashboard = recorderApplication.GetWindow("DashBoard", InitializeOption.NoCache);
ListBox desktopApplications = dashboard.Get<ListBox>("applications");
ListItem selectedApplication = desktopApplications.SelectedItem;
if (selectedApplication.Text.Equals(application.Name))
selectedApplication.DoubleClick();
else
desktopApplications.Select(application.Name);
string text = dashboard.Get<ListBox>("windows").SelectedItemText;
Assert.AreEqual("Form1", text);
dashboard.Get<RadioButton>("core").Click();
dashboard.Get<Button>("record").Click();
editor = dashboard.Get<MultilineTextBox>("codeEditor");
}