<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
</ItemGroup>
</Project>
&#13;
我的环境:VS2017 15.5
Blogging.Web.csproj
public static async clickIfDisplayed(targetElement: ElementFinder) {
const isPresent = await targetElement.isPresent();
if (isPresent) {
const isDisplayed = await targetElement.isDisplayed();
if (isDisplayed) {
await PageHelper.click(targetElement);
}
}
}
&#13;