首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >构建TestStack.White应用程序时出错

构建TestStack.White应用程序时出错
EN

Stack Overflow用户
提问于 2016-02-25 06:18:52
回答 1查看 782关注 0票数 1

在构建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

我的代码是:

代码语言:javascript
复制
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‘相关

EN

回答 1

Stack Overflow用户

发布于 2016-02-25 06:25:41

在声明mainWindow时指定命名空间TestStack.White.UIItems.WindowItems.Window mainWindow。编译器无法区分System.Windows.WindowTestStack.White.UIItems.WindowItems.Window

或者,您可以使用this解决方案。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35614343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档