qaf icon indicating copy to clipboard operation
qaf copied to clipboard

qaf automation test chrome headful support

Open bhumi-sysops opened this issue 2 years ago • 2 comments

QAF Version

Note: only the latest version is supported I am using latest version available on github public repo qaf-blank-project-maven

I want to know whether headfull chrome option is supported or not.

Steps To Reproduce

1.Copy default repo in your own private repo
2.Create Run Automation Tests.yml file in workflow
3.Run the pipeline

Expected behavior

Run Test should pass

Actual behavior

Run Test is failing with following error

Unable to create driver instance in 1st attempt with retry timeout of 0 seconds. You can check/set value of 'driver.init.retry.timeout' appropriately to set retry timeout on driver initialization failure.Unable to Create Driver Instance for chrome: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'fv-az190-893', ip: '10.1.1.72', os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-1023-azure', java.version: '1.8.0_352' Driver info: driver.version: ChromeDriver

Is the issue reproducible on runner?

  • [ ] QAS
  • [x] Maven
  • [ ] Gradle
  • [ ] Ant
  • [ ] Eclipse

Test case sample

Please, share the test case (as small as possible) which shows the issue It is working with headless option but I want chrome to run without headless option

here is Run Automation Test.yml file

on:

push:

branches: [ "main" ]

pull_request:

branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest



steps:

- uses: actions/checkout@v3

- name: Set up JDK 17

  uses: actions/setup-java@v3

  with:

    java-version: '8'

    distribution: 'temurin'

    cache: maven

- name: Install Google Chrome

  run: |

    cd /tmp/

    sudo wget --no-verbose https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

    sudo dpkg -i google-chrome-stable_current_amd64.deb

    /usr/bin/google-chrome -version

- name: Run Tests

  continue-on-error: true

  run: |

    mvn clean install

- name: Directory Strucutre

  run: ls -la

  

- name: Archive code coverage results

  uses: actions/upload-artifact@v3

  with:

    name: automation-test-results

    retention-days: 3

    path: |

      dashboard.htm

      test-results

      dashboard

bhumi-sysops avatar Nov 30 '22 14:11 bhumi-sysops

This is related to environment setup issue.

cjayswal avatar Dec 03 '22 19:12 cjayswal

@cjayswal thank you for the response. Can you pls provide more detail on what can be changed so that test case in github action with headless-off run with success?

bhumi-sysops avatar Dec 05 '22 08:12 bhumi-sysops