在构建TestStack.White应用程序时,我遇到了以下错误:
错误1无法将类型'TestStack.White.UIItems.WindowItems.Window‘隐式转换为'System.Windows.Window’c:\users\daniel.cbt\documents\visual studio 2013\Projects\I2K-White\I2K-White\MainWindow.xaml.cs 37 33 I2K-White
我的代码是:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Automation;
//using NUnit.Framework;
using TestStack.White;
using TestStack.White.Configuration;
using TestStack.White.UIItems;
using TestStack.White.UIItems.Finders;
namespace I2K_White
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
TestStack.White.Application app =
TestStack.White.Application.Launch("c:\\Integris-2000\\I2K-GUI.exe");
Window mainWindow = `enter code here`app.GetWindow(TestStack.White.UIItems.Finders.SearchCriteria.ByText("2000 Remote Radio Installation Tester"),
TestStack.White.Factory.InitializeOption.WithCache);该错误与'GetWindow‘相关
发布于 2016-02-25 06:25:41
在声明mainWindow时指定命名空间TestStack.White.UIItems.WindowItems.Window mainWindow。编译器无法区分System.Windows.Window和TestStack.White.UIItems.WindowItems.Window
或者,您可以使用this解决方案。
https://stackoverflow.com/questions/35614343
复制相似问题