简体   繁体   English

在 Selenium 中编码的 UI 编译的 DLL?

[英]Coded UI compiled DLLs in Selenium?

I am trying to use Coded UI compiled Dlls in Selenium project.我正在尝试在 Selenium 项目中使用编码的 UI 编译的 Dll。 I Created on Class Library Project in Visual Studio where I created on class in this i write one simple method to draw highlight the "Save as window" like:我在 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();
    }
}

} }

After Build the application, i added this DLL in my selenium (C#, which is different project) project through reference.构建应用程序后,我通过引用在我的 selenium(C#,这是不同的项目)项目中添加了这个 DLL。

 namespace  SeleniumProj
 {
    [TestFixture] 
  public  class TestDll
   {

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

} }

But the problem here is i am unable to Build.但这里的问题是我无法构建。 When i try to run it is giving message like "There were build errors"当我尝试运行时,它会给出类似“存在构建错误”的消息

Coded UI is available only in enterprise license of Visual Studio.编码 UI 仅在 Visual Studio 的企业许可中可用。 Also VS 2019 will be the last version of Visual Studio that contains the Coded UI test functionality as Microsoft is deprecating the coded UI from later version onward.此外,VS 2019 将是包含编码 UI 测试功能的 Visual Studio 的最后一个版本,因为 Microsoft 从更高版本开始弃用编码 UI。 For more detail on this please follow this link .有关这方面的更多详细信息,请访问此链接

I would suggest to go for appium Winappdriver to solve your windows UI control problem.我建议使用 appium Winappdriver 来解决您的 Windows UI 控制问题。 You can get appium winappdiver from this link : https://github.com/Microsoft/WinAppDriver您可以从此链接获取 appium winappdiver: https : //github.com/Microsoft/WinAppDriver

To learn more about WInappdriver you can refer the below links:要了解有关 WInappdriver 的更多信息,您可以参考以下链接:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM