尝试根据用户的操作系统是否为Windows 10+或更低版本来设置属性。
但是,每当我在OS标记内启用命令时,都不会设置属性。然后注释掉它们,然后再次设置属性。
以下代码:
<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
<version>(,10.0)</version>
</os>
</activation>
<properties>
<ChromeWebDriverLocation>${basedir}${file.separator}driver${file.separator}win32${file.separator}chrome${file.separator}chromedriver.exe</ChromeWebDriverLocation>
<IEWebDriverLocation>${basedir}${file.separator}driver${file.separator}win32${file.separator}ie${file.separator}IEDriverServer.exe</IEWebDriverLocation>
<SkipIETests>false</SkipIETests>
<SkipEdgeTest>true</SkipEdgeTest>
</properties>
</profile>
<profile>
<id>windows10Edge</id>
<activation>
<os>
<family>windows</family>
<version>[10.0,)</version>
</os>
</activation>
<properties>
<ChromeWebDriverLocation>${basedir}${file.separator}driver${file.separator}win32${file.separator}chrome${file.separator}chromedriver.exe</ChromeWebDriverLocation>
<EdgeWebDriverLocation>${basedir}${file.separator}driver${file.separator}win64${file.separator}edge${file.separator}MicrosoftWebDriver.exe</EdgeWebDriverLocation>
<SkipIETests>true</SkipIETests>
<SkipEdgeTest>false</SkipEdgeTest>
</properties>
</profile>
<profiles>