Add W3C validation check to template

Guys, need help

I want to add W3C validator check HTML to find missing tags or markup errors

To docker-compose add

  selenium:
    image: selenium/standalone-firefox:4.0.0-alpha-7-prerelease-20200921
    volumes:
      - /dev/shm:/dev/shm
    ports:
      - 4444:4444

To acceptance.suite.yml add

enabled:
    - WebDriver:
        url: http://frontend/
        host: 'selenium'
        port: 4444
        browser: firefox

And it work, but in test case method $I->grabPageSource() return HTML without first line of doctype: <!DOCTYPE html>

Any ideas?

Add some information. Right config for docker:

  selenium-event-bus:
    image: selenium/event-bus:4.0.0-alpha-7-prerelease-20200921
    container_name: selenium-event-bus
    ports:
      - "4442:4442"
      - "4443:4443"
      - "5557:5557"

  selenium-sessions:
    image: selenium/sessions:4.0.0-alpha-7-prerelease-20200921
    container_name: selenium-sessions
    ports:
      - "5556:5556"
    depends_on:
      - selenium-event-bus
    environment:
      - SE_EVENT_BUS_HOST=selenium-event-bus
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443

  selenium-distributor:
    image: selenium/distributor:4.0.0-alpha-7-prerelease-20200921
    container_name: selenium-distributor
    ports:
      - "5553:5553"
    depends_on:
      - selenium-event-bus
      - selenium-sessions
    environment:
      - SE_EVENT_BUS_HOST=selenium-event-bus
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_SESSIONS_MAP_HOST=selenium-sessions
      - SE_SESSIONS_MAP_PORT=5556

  selenium-router:
    image: selenium/router:4.0.0-alpha-7-prerelease-20200921
    container_name: selenium-router
    ports:
      - "4444:4444"
    depends_on:
      - selenium-distributor
      - selenium-sessions
    environment:
      - SE_DISTRIBUTOR_HOST=selenium-distributor
      - SE_DISTRIBUTOR_PORT=5553
      - SE_SESSIONS_MAP_HOST=selenium-sessions
      - SE_SESSIONS_MAP_PORT=5556

  chrome:
    image: selenium/node-chrome:4.0.0-alpha-7-prerelease-20200921
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - selenium-event-bus
    environment:
      - SE_EVENT_BUS_HOST=selenium-event-bus
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
    ports:
      - "6900:5900"

  firefox:
    image: selenium/node-firefox:4.0.0-alpha-7-prerelease-20200921
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - selenium-event-bus
    environment:
      - SE_EVENT_BUS_HOST=selenium-event-bus
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
    ports:
      - "6901:5900"

  opera:
    image: selenium/node-opera:4.0.0-alpha-7-prerelease-20200921
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - selenium-event-bus
    environment:
      - SE_EVENT_BUS_HOST=selenium-event-bus
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
    ports:
      - "6902:5900"

Config for frontend/tests/acceptance.suite.yml will be:

suite_namespace: frontend\tests\acceptance
actor: AcceptanceTester
modules:
    enabled:
        - WebDriver:
            url: http://frontend/
            host: 'selenium-router'
            path: '/'
            browser: firefox
        - Yii2:
            part: init

And browser list can see here: http://localhost:4444/status

  • firefox
  • chrome
  • operablink

But $I->grabPageSource() return HTML without first line of doctype too: <!DOCTYPE html>