繁体   English   中英

如何克服在Xamarin移动应用程序中安装Selenium WebDriver的问题?

[英]How to overcome the issue on installing Selenium WebDriver in Xamarin mobile application?

我尝试通过NuGet解决方案下载Selenium.WebDriver,但出现以下错误:

Failed to add reference. The package 'Selenium.WebDriver' tried to add a framework reference to 'System.Drawing' which was not found in the GAC.

当我在xamarin中安装Appium时,出现与上述相同的错误,因此任何人都可以与我分享如何解决此问题的想法?

  1. 编辑您的.csproj文件。
    1. 在Visual Studio中,您可以“卸载”项目,然后右键单击已卸载的项目,然后就可以进行编辑。
  2. 找到包含引用的ItemGroup并对其进行编辑以包含此行
    1. <Reference Include="System.Drawing" />

像这样:

<ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Drawing" />
    <Reference Include="WebDriver, Version=3.141.0.0, Culture=neutral, processorArchitecture=MSIL">

暂无
暂无

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

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