2015-10-19 51 views

回答

0

由于它是Flash播放器,因此无法在DOM元素上运行断言。但是,您可以使用播放器API进行声明:

it('it should be possible to play video', function() { 
    //play is initially at position 0 
    expect(browser.executeScript('jwplayer().getPosition()')).toBe(0); 

    $('video-container').click(); //clicks on the middle of the container div starts the diveo 
    browser.sleep(2000); 
    $('video-container').click(); //clicks on the middle of the container div stops the diveo 

    //play has moved its position 
    expect(browser.executeScript('jwplayer().getPosition()')).toBeGreaterThan(0); 
}); 
相关问题