To manipulate elements that are in iframes you should switch to iframe first.
describe('video', () => {
it('manipulate video', () => {
browser.url('https://www.volvocars.com/ph/why-volvo/human-innovation/future-of-driving/safety/a-million-more')
// get rid of cookies
browser.execute(`document.cookie = "OptanonAlertBoxClosed=${new Date().toISOString()};";`)
browser.refresh()
// open video
const video1 = $('.videoWrapperItemList')
expect(video1).toBeClickable()
video1.click()
// Important! Switch to iframe to interact with video player
const videoIframe = $('#IframeExteriorTwoyoutube.video-active')
browser.switchToFrame(videoIframe)
const player = $('#movie_player')
// video is playing
expect(player).toHaveElementClass('playing-mode')
// pause video
const playPauseButton = $('.ytp-play-button')
expect(playPauseButton).toBeClickable()
playPauseButton.click()
// video is paused
expect(player).toHaveElementClass('paused-mode')
// check current time
expect($('.ytp-time-current')).toHaveTextContaining('0:0')
browser.pause(2000) // demo purposes
})
})