0

Unable to open Allure report in Firefox latest version 68. After we generate report using mvn allure:report, we opened index.html file. But no report is displayed.

Used Jar - Allure maven 2.10.0

gowtham
  • 1
  • 1
  • https://stackoverflow.com/questions/56999411/firefox-68-local-files-now-treated-as-cross-origin-is-there-a-way-to-override – Saurabh Jul 23 '19 at 10:15
  • @saurabh. Thanks, it worked. Do we have permanent fix in upcoming version. – gowtham Jul 25 '19 at 06:58

1 Answers1

0

I generated the allure report as html , and ran in chrome after disabling security parameters temporarily To generate Allure report as html, I used the command as per the format: allure generate allure-results allure-report-html

After this I created a batch file (windows) and placed it inside the report folder. To run the report I simply executed the batch file and the report opened in chrome.

I used chrome v79 Also to run the report in firefox You can leverage this restriction by going to about:config url and then uncheck privacy.file_unique_origin boolean value.

However be aware that this only reverts to < 68 protection > mode I have shared my batch file .

TASKKILL /F /IM chrome.exe
set "Command="
SET mypath=%~dp0
echo %mypath:~0,-1%
for /f "tokens=2,*" %%A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\shell\open\command" /ve 2^>nul') do set "Command=%%~B"
if not defined Command for /f "tokens=2,*" %%A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Clients\StartMenuInternet\Google Chrome\shell\open\command" /ve 2^>nul') do set "Command=%%~B"
if not defined Command echo Google Chrome was not found.
if defined Command start "Browser" "%Command%"  --allow-file-access-from-files --disable-web-security "%mypath:~0,-1%/index.html"

Hope this helps