d054702741
d054702741

Reputation: 21

Error while build my TestStack.White application

I've got the following error while build TestStack.White application:

Error 1 Cannot implicitly convert type 'TestStack.White.UIItems.WindowItems.Window' to 'System.Windows.Window' c:\users\daniel.cbt\documents\visual studio 2013\Projects\I2K-White\I2K-White\MainWindow.xaml.cs 37 33 I2K-White

My code is:

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);

and the error is related to 'GetWindow'

Upvotes: 1

Views: 845

Answers (1)

Jonathan Carroll
Jonathan Carroll

Reputation: 870

Specify the namespace TestStack.White.UIItems.WindowItems.Window mainWindow when declaring mainWindow. The compiler is not able to differentiate System.Windows.Window and TestStack.White.UIItems.WindowItems.Window

Alternatively you can use this solution.

Upvotes: 1

Related Questions