Christian Bromann

Software Engineer

Clients

Browser

Driver

Chrome
WebdriverIO
Selenium
chromedriver

Selenium

  • Communication over a simplified HTTP protocol
  • Support for all programming languages

Webdriver

  • Browser automation using native interfaces
  • No cross site scripting issues
							
$ Google\ Chrome --remote-debugging-port=9222
						
Inspected Pages Debug the debugger
HbbTV

Set Top Boxes

Smart TV Sticks

Game Consoles

Android TV Firefox OS Roku TV Tizen OS Web OS

Hello World HbbTV App


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <!-- Required MIME content type as described in the HbbTV-standard: A.2.6.2. -->
    <meta http-equiv="Content-Type"
      content="application/vnd.hbbtv.xml+xhtml; utf-8" />
    <script type="text/javascript" src="HelloWorld.js"></script>
    <link rel="stylesheet" href="HelloWorld.css" />
    <title>Hello World HbbTV Application</title>
  </head>
  <body onload="initApp();">
    <object style="width:0; height:0;" id="appMan"
      type="application/oipfApplicationManager"></object>
    <div class="safe_area" id="app_area">
    <div id="background_plane"><h1>Hello World</h1></div>
  </body>
</html>
                            

HbbTV Application Logic


function initApp() {
    var oipf = document.getElementById(appMan);
    var app = oipf.getOwnerApplication(document);
    app.show()

    // ...
    // your custom logic here
    // don't fear the ES3 engine ಠ‿ಠ
    // ...
}
                            
In Regular Operation
Announced / Trials
Under Consideration
Inactive Countries

Broadcast-independant applications

  • Not assosicated with a broadcast stream
  • TV apps provided by the device vendor

Broadcast-related applications

  • Associated and opened with a specific broadcast stream
  • Automatic or explicit launch by user via Red Button
broadcaster broadcaster
broadcaster broadcaster broadcaster broadcaster broadcaster broadcaster
AIT Package
broadcaster broadcaster
broadcaster

DevTools Backend

DevTools Backend
DOM.enable Request DOM.enable Response DOM.getDocument Request DOM.getDocument Response

Appium HbbTV Driver

Appium HbbTV Driver

HbbTV E2E Test


import BPS from '../page_objects/bps.page'
import { expect } from 'chai'

describe('MPAT HbbTV App - DVB-T2 Broadcast Probing System', () => {
    it('should open correct page', () => {
        BPS.open()
        expect(BPS.header.getText()).to.be.equal(BPS.title)
    })

    it('should not play video from the beginning', () => {
        expect(BPS.videoThumbnail.isExisting()).to.be.equal(true)
        expect(BPS.video.isExisting()).to.be.equal(false)
    })

    it('should start the video', () => {
        browser.keys('right')
        browser.keys('enter')
        expect(BPS.video.isExisting()).to.be.equal(true)
    })

    it('should play video', () => {
        expect(BPS.isVideoPlaying()).to.be.equal(true)
    })
})
                            

HbbTV Page Object


import { Page } from './mpat.page'

class BroadcastProbingSystemPage extends Page {
    open () {
        super.open()
        browser.keys('down').keys('down').keys('down').keys('down').keys('down').keys('enter')
        browser.waitUntil(() => this.activeMenuItem.getText() === 'BPS')
        browser.pause(2000)
    }

    get title () { return 'DVB-T2 Broadcast Probing System' }
    get videoThumbnail () { return $('.video-content .thumbnail') }
    get video () { return $('.video-wrapper > object') }

    isVideoPlaying () {
        return browser.waitUntil(() => {
            return browser.execute(function () {
                return document.querySelector('.video-wrapper > object').playState === 1
            }).value
        }, 10000, 'video never started')
    }
}

export default new BroadcastProbingSystemPage()
export { BroadcastProbingSystemPage as Page }
                            

Key Takeaways

  • Learn about the WebDriver protocol and all the
    automation driver, it helps
  • Read the source code
  • Contribute