Skip to content

add headless chrome browser option for UI only tests #313

@toschneck

Description

@toschneck

Like described on Google Dev Blog Chrome 59+ supports a headless mode. Due to this fact we can us this for "UI only" tests with Sakuli.

Solution:

  • configure the browser configuration of sahi like in the attached linux.xml
  • user as browser chrome_headless
FROM consol/sakuli-ubuntu-xfce:v1.1.0
COPY linux.xml $SAKULI_ROOT/sahi/config/browser_types/
ENV TESTSUITE_BROWSER=chrome_headless
<browserTypes>
  ....
    <browserType>
        <name>chrome_headless</name>
        <displayName>Chrome Headless</displayName>
        <icon>chrome.png</icon>
        <path>/usr/bin/google-chrome</path>
        <options>--incognito --headless --disable-gpu --remote-debugging-port=9222 --user-data-dir=$userDir/browser/chrome/profiles/sahi$threadNo --start-maximized --no-default-browser-check --no-first-run --disable-infobars --proxy-server=localhost:9999 --disable-popup-blocking</options>
        <processName>chrome</processName>
        <capacity>5</capacity>
    </browserType>
</browserTypes>

TODO:

  • Add chrome_headless as additional browser like firefox_portable
  • Add Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions