Selenium中的编码UI编译的DLL?

问题描述 投票:0回答:1

我正在Selenium项目中使用编码的UI编译的Dll。我在Visual Studio的类库项目中创建的,我在类中创建的,我写了一种简单的方法来绘制突出显示的“另存为窗口”,例如:

 namespace CreadeDll
  {
   public class Class1
  {

    public void ValidateSaveasWidnow()
    {
        WinWindow window = new WinWindow();
        window.SearchProperties.Add(WinWindow.PropertyNames.ControlType, "Window");
        window.SearchProperties.Add(WinWindow.PropertyNames.Name, "Save Print Output As"); 
        window.DrawHighlight();
    }
}

}

构建应用程序后,我通过引用将这个DLL添加到了我的硒(C#,这是另一个项目)项目中。

 namespace  SeleniumProj
 {
    [TestFixture] 
  public  class TestDll
   {

    [Test]
    public void gets()
    {             
        CreadeDll.Class1 c = new CreadeDll.Class1();
         c.ValidateSaveasWidnow();            
    }
}

}

但是这里的问题是我无法构建。当我尝试运行时,它会显示类似“发生构建错误”的消息]

selenium-webdriver coded-ui-tests
1个回答
0
投票

编码的UI仅在Visual Studio的企业许可中可用。 VS 2019还将是Visual Studio的最后一个版本,其中包含编码的UI测试功能,因为Microsoft从更高版本开始不推荐使用编码的UI。有关此的更多详细信息,请遵循link

我建议使用appium Winappdriver解决您的Windows UI控件问题。您可以从以下链接获取appium winappdiver:https://github.com/Microsoft/WinAppDriver

要了解有关WInappdriver的更多信息,可以参考以下链接:

© www.soinside.com 2019 - 2024. All rights reserved.