Katalon Studio Github Action: Is there any way to set a specific version of the browser?

69 views Asked by At

I'm trying to solve a problem, the tests pass when they are run locally using Katalon Studio, but when run in Katalon Studio Github Action some tests fail, I believe it is because the tests are running in a different version of the Chrome browser.

These are the parameters I am using:

runs-on: windows-latest
steps:
  - name: Checkout
    uses: actions/checkout@v3

  - name: Katalon Studio Github Action
    uses: katalon-studio/[email protected]
    with:
      version: "9.0.0"
      projectPath: "${{ github.workspace }}"
      args: '-noSplash -retry=0 -browserType=Chrome -testSuiteCollectionPath="Test Suites/xxx" -apiKey= xxx --config -webui.autoUpdateDrivers=true'
1

There are 1 answers

0
JULIEN MER On BEST ANSWER

You should use this pipeline with the following steps :

- name: Install specific version of Chrome
  run: |
    $ChromeVersion = "PUT_YOUR_CHROME_VERSION_HERE"
    Invoke-WebRequest "https://dl.google.com/tag/s/dl/chrome/install/$ChromeVersion/chrome_installer.exe" -OutFile "chrome_installer.exe"
    Start-Process chrome_installer.exe -ArgumentList '/silent', '/install' -Wait

- name: Install specific ChromeDriver
  run: |
    $ChromeMajorVersion = "PUT_YOUR_CHROME_MAJOR_VERSION_HERE"
    $ChromeDriverVersion = Invoke-RestMethod -Uri "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$ChromeMajorVersion"
    Invoke-WebRequest "https://chromedriver.storage.googleapis.com/$ChromeDriverVersion/chromedriver_win32.zip" -OutFile "chromedriver_win32.zip"
    Expand-Archive "chromedriver_win32.zip" -DestinationPath "C:\Windows\System32"