11
11
12
12
<!-- disable by default on unsupported platforms -->
13
13
<InstallChromeForTests Condition =" '$(InstallChromeForTests)' == '' and '$(ChromeOSIdentifier)' == ''" >false</InstallChromeForTests >
14
+ <InstallFirefoxForTests Condition =" '$(InstallChromeForTests)' == '' and '$(ChromeOSIdentifier)' == ''" >false</InstallFirefoxForTests >
14
15
<InstallV8ForTests Condition =" '$(InstallV8ForTests)' == ''" >false</InstallV8ForTests >
15
16
16
- <FirefoxDir >$(ArtifactsBinDir)firefox\</FirefoxDir >
17
- <FirefoxStampFile >$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))</FirefoxStampFile >
18
17
<_BrowserStampDir >$(ArtifactsBinDir)\</_BrowserStampDir >
19
18
20
19
<WasmProvisionAfterTarget Condition =" '$(WasmProvisionAfterTarget)' == ''" >Build</WasmProvisionAfterTarget >
21
20
</PropertyGroup >
22
21
23
- <Import Project =" $(MSBuildThisFileDirectory)ChromeVersions.props" />
24
-
25
22
<PropertyGroup Condition =" '$(BrowserHost)' != 'windows'" >
26
- <FirefoxRevision >108.0.1</FirefoxRevision >
23
+ <FirefoxRevision >124.0.2</FirefoxRevision >
24
+ <GeckoDriverRevision >0.34.0</GeckoDriverRevision >
27
25
<FirefoxUrl >https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl >
26
+ <GeckoDriverUrl >https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v$(GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl >
28
27
<FirefoxBinaryName >firefox</FirefoxBinaryName >
28
+ <GeckoDriverBinaryName >geckodriver</GeckoDriverBinaryName >
29
+ <FirefoxDir >$(ArtifactsBinDir)firefox\</FirefoxDir >
30
+ <GeckoDriverDir >$(ArtifactsBinDir)geckodriver\</GeckoDriverDir >
31
+ <FirefoxStampFile >$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))</FirefoxStampFile >
32
+ <GeckoDriverStampFile >$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(GeckoDriverRevision).stamp'))</GeckoDriverStampFile >
33
+ <GeckoDriverBinaryPath >$([MSBuild]::NormalizePath($(GeckoDriverDir)))</GeckoDriverBinaryPath >
34
+ <FirefoxBinaryPath >$([MSBuild]::NormalizePath($(FirefoxDir)))</FirefoxBinaryPath >
29
35
</PropertyGroup >
30
36
37
+ <Import Project =" $(MSBuildThisFileDirectory)ChromeVersions.props" />
38
+
31
39
<PropertyGroup Condition =" $([MSBuild]::IsOSPlatform('linux'))" >
32
40
<ChromeDirName >chrome-linux</ChromeDirName >
33
41
<ChromeDriverDirName >chromedriver_linux64</ChromeDriverDirName >
84
92
<V8BinaryPath >$([MSBuild]::NormalizePath($(V8Dir), $(V8BinaryName)))</V8BinaryPath >
85
93
</PropertyGroup >
86
94
87
- <PropertyGroup Condition =" '$(BrowserHost)' != 'windows'" >
88
- <FirefoxRevision >108.0.1</FirefoxRevision >
89
- <FirefoxUrl >https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl >
90
- <FirefoxBinaryName >firefox</FirefoxBinaryName >
91
- </PropertyGroup >
92
-
93
95
<Target Name =" DownloadAndInstallChrome"
94
96
AfterTargets =" $(WasmProvisionAfterTarget)"
95
97
Condition =" (!Exists($(ChromeStampFile)) or !Exists($(ChromeBinaryPath))) and '$(InstallChromeForTests)' == 'true'" >
@@ -188,10 +190,13 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
188
190
<Delete Files =" @(_StampFile)" />
189
191
<RemoveDir Directories =" $(FirefoxDir)" />
190
192
193
+ <Message Text =" ** Installing firefox version $(FirefoxRevision), to: $(FirefoxDir). To disable this set the msuild property InstallFirefoxForTests=false ."
194
+ Importance =" High" />
195
+
191
196
<DownloadFile SourceUrl =" $(FirefoxUrl)" DestinationFolder =" $(FirefoxDir)" SkipUnchangedFiles =" true" >
192
197
<Output TaskParameter =" DownloadedFile" PropertyName =" _DownloadedFile" />
193
198
</DownloadFile >
194
- <Exec Command =" tar -xf $(_DownloadedFile) -C $(FirefoxDir)" />
199
+ <Exec Command =" tar -xf $(_DownloadedFile) -C $(FirefoxDir) --strip-components=1 " />
195
200
<Exec Command =" rm -rf $(_DownloadedFile)" />
196
201
197
202
<PropertyGroup >
@@ -205,4 +210,35 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
205
210
206
211
<Touch Files =" $(FirefoxStampFile)" AlwaysCreate =" true" />
207
212
</Target >
213
+
214
+ <Target Name =" DownloadAndInstallGeckoDriver"
215
+ AfterTargets =" $(WasmProvisionAfterTarget)"
216
+ Condition =" !Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows'))" >
217
+ <ItemGroup >
218
+ <_StampFile Include =" $(_BrowserStampDir).install-geckodriver*.stamp" />
219
+ </ItemGroup >
220
+
221
+ <Delete Files =" @(_StampFile)" />
222
+ <RemoveDir Directories =" $(GeckoDriverDir)" />
223
+
224
+ <Message Text =" ** Installing GeckoDriver version $(GeckoDriverRevision), to: $(GeckoDriverDir). To disable this set the msuild property InstallFirefoxForTests=false ."
225
+ Importance =" High" />
226
+
227
+ <DownloadFile SourceUrl =" $(GeckoDriverUrl)" DestinationFolder =" $(GeckoDriverDir)" SkipUnchangedFiles =" true" >
228
+ <Output TaskParameter =" DownloadedFile" PropertyName =" _DownloadedFile" />
229
+ </DownloadFile >
230
+ <Exec Command =" tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)" />
231
+ <Exec Command =" rm -rf $(_DownloadedFile)" />
232
+
233
+ <PropertyGroup >
234
+ <_GeckoDriverBinaryPath >$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverBinaryName)))</_GeckoDriverBinaryPath >
235
+ </PropertyGroup >
236
+
237
+ <Error Text =" Cannot find GeckoDriver at $(_GeckoDriverBinaryPath) in the downloaded copy"
238
+ Condition =" !Exists($(_GeckoDriverBinaryPath))" />
239
+
240
+ <Exec Command =" chmod +x $(_GeckoDriverBinaryPath)" />
241
+
242
+ <Touch Files =" $(GeckoDriverStampFile)" AlwaysCreate =" true" />
243
+ </Target >
208
244
</Project >
0 commit comments